Upgrading @typescript-eslint/eslint-plugin 5 to 6
Breaking5.62.0 → 6.21.0Breaking19Platform2Deprecated4New42Changed20Fixed97Other36
BreakingUpgrade verdict
19 breaking changes and 2 platform requirement changes.
In plain terms
- Rules that were already marked deprecated have been deleted, so configs using them will fail.
- The option to run with only partial type information is gone.
- The old compatibility export for visitor keys is no longer available.
- Removes optionality from AST boolean properties in typescript-estree.
Must act Top 5 of 25 that need code or config changes
Node.js requirement changed in 6.0.0-alpha.158: ^12.22.0 || ^14.17.0 || >=16.0.0 → ^16.0.0 || >=18.0.0.
Adds @typescript-eslint/visitor-keys 6.21.0, natural-compare ^1.4.0, ts-api-utils ^1.0.1.
Drops natural-compare-lite, tsutils.
Installs 44 packages in all (was 46).
What you must change
Breaking19
Removes deprecated rules for v6.
Removes the partial type-information program.
Removes the visitor-keys backwards compat export.
visitor-keysRemoves optionality from AST boolean properties in typescript-estree.
Removes the moduleResolver API.
moduleResolverRenames the restrict-plus-operands option checkCompoundAssignments to skipCompoundAssignments.
restrict-plus-operandscheckCompoundAssignmentsskipCompoundAssignmentsRemoves parseWithNodeMaps from typescript-estree.
parseWithNodeMapsMakes BaseNode.parent non-optional.
BaseNode.parentReworks configs: recommended, strict, stylistic, and -type-checked.
recommendedstrictstylistic-type-checkedRemoves the experimental-utils package.
experimental-utilstypescript-estree now throws errors on interfaces with implements clauses.
Adds strict class heritage clause checks in typescript-estree.
typescript-estree checks for illegal decorators on function declarations.
typescript-estree throws errors for object methods without function bodies.
typescript-estree checks modifiers on every node.
typescript-estree throws errors when an abstract property has an initializer.
Removes
RuleTester from /utils in favour of the new /rule-tester package.RuleTesterApplies final v6 changes to the plugin's shared configs.
Makes final config changes for v6 in the ESLint plugin.
Platform2
Bumps the supported TypeScript version to 5.2.
Drops support for Node v14 and tests against Node v20.
Deprecations to plan for
Deprecated4
Deprecates the formatting rules in the eslint-plugin.
Logs a console.warn when experimental-utils is imported.
experimental-utilsDeprecates the no-type-alias rule.
no-type-aliasWarns on deprecated AST property accesses in typescript-estree.
API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- removed:
const configs: Record<string, TSESLint.Linter.Config> - removed:
const rules: Record<string, TSESLint.RuleModule<string, unknown[]>> - added:
const cjsExport: { configs: Record<string, ClassicConfig.Config>; rules: typeof rules } - added:
export = cjsExport
- added:
const rules: TypeScriptESLintRules - added:
default rules - added:
type TypeScriptESLintRules = Record<string, RuleModule<string, unknown[]>>