`export *` loads the module; `export type *` is erased. The autofix
rewrote one into the other whenever a module exported only types, so a
module that registers something when loaded stopped being loaded (the
api typegen lost its Handlebars partial this way).
The report stays an error; the rewrite is now a suggestion, which --fix
does not apply. Named re-exports are unaffected: under
verbatimModuleSyntax their type-only form is already a compile error.
typescript-eslint 8 reports `x as T` as unnecessary when the receiver
would accept `x` unchanged, and its autofix deletes the assertion. That
is unsound when the assertion also drives inference around it:
const { validators } = found || { validators: {} as ValPoints };
loses the type of `validators`, and every later use becomes an
unresolved type (api-derive's stakerRewards after an autofix). It also
deletes assertions kept on purpose for another environment's typings.
Across api, common, ui and apps it raised 45 reports.
The plugin is now registered through withoutContextualAssertions, which
drops only that report on `as` / `<T>` assertions. Assertions to the
type an expression already has are still reported and fixed, and so
are non-null assertions a receiver makes unnecessary. A spec lints a
fixture through the real type checker with the plugin wrapped and as
published, so it fails if the filter stops filtering.
eslint 8 and typescript-eslint 6 are past their support, and the webpack
dev server chain carried the dependency alerts every repository using this
package inherited. Upstream @polkadot/dev still pins the same versions, so
this leaves it on purpose.
The rules are carried over with their options, so the lint means what it
meant:
- eslint-config-standard 17 (written for eslint 8) is replaced by its 161
rules in config/eslint.standard.js, with their options. Its 48 formatting
rules, deprecated in eslint core, are the same rules in @stylistic;
no-new-object and no-new-symbol are no-object-constructor and
no-new-native-nonconstructor; import/* is import-x/*.
- eslint-plugin-import (eslint <= 9) is eslint-plugin-import-x;
eslint-plugin-deprecation is @typescript-eslint/no-deprecated; the
formatting rules of core, typescript-eslint and eslint-plugin-react used
in eslint.rules.js are their @stylistic versions with the same options.
- typescript-eslint 8's preset swaps core no-unused-expressions for its own
with default options; standard's (short circuit, ternary and tagged
templates allowed) are carried over to it.
- eslint-plugin-react and eslint-plugin-header still call context methods
eslint 10 removed; @eslint/compat's fixupPluginRules supplies them. The
header rule also gets `schema: false`, as eslint 9+ rejects options for a
rule with no schema. The original header plugin stays rather than its
fork: it reports at the first token after leading comments, so a
generated file's /* eslint-disable */ still covers it, as it always has.
The effective config was compared rule by rule (--print-config) for .ts,
.tsx, .spec.ts and .mjs files before and after. Every rule that left has
its successor active; option differences are eslint 10 spelling out
defaults. New rules come from the eslint 10, typescript-eslint 8 and
react-hooks 7 presets. no-inner-declarations left eslint's preset upstream.
Also current: webpack-dev-server 6, webpack-cli 7, webpack-merge 6, rollup
plugins, madge 8, gh-release 8, globals 17, espree 11; Node >= 20.19 for
the dev package, which eslint 10 requires.
In this repository the new rules found: Function types now named by
no-unsafe-function-type; optional chains, includes() and RegExp#exec where
they say the same thing; createWrapper returns Describe, so its three casts
were redundant; rootCjs.spec casts through unknown, so the lint result does
not depend on whether build/ exists. lint, build and test (149 passed) pass,
and lint leaves the tree unchanged with and without a build.
@tsconfig/strictest dropped checkJs in 2.0.8, so every .js and .mjs file
fell out of the program: lint could not parse them with type information,
and JavaScript in every repository built with this config went unchecked.
allowJs and checkJs are now set here, independent of the base.
Two @ts-expect-error lines in config/eslint.js no longer had an error to
expect: eslint-plugin-import 2.32 and eslint-plugin-react 7.37 ship types.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
- Updated all copyright headers from 2025 to 2026 (system date shows 2026)
- Added build output files to eslint ignore list in packages/dev/config/eslint.js
- Added build output patterns to .gitignore
- Ignored: packages/*/*.{d.ts,js,mjs,cjs}, packages/*/cjs/**, packages/*/env/**,
packages/*/rootJs/**, packages/*/rootStatic/**
- Successfully resolved 521 lint errors by properly ignoring generated files
- Build outputs should not be linted (source files are linted instead)
- Lint and build now pass successfully