Skip to content

Upgrading @typescript-eslint/eslint-plugin 5 to 6

Breaking5.62.0 → 6.21.0Breaking19Platform2Deprecated4New42Changed20Fixed97Other36

BreakingUpgrade verdict

19 breaking changes and 2 platform requirement changes.

  • 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.
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).

Breaking19
Removes deprecated rules for v6.
Removes the partial type-information program.
Removes the visitor-keys backwards compat export.
visitor-keys
Removes optionality from AST boolean properties in typescript-estree.
Removes the moduleResolver API.
moduleResolver
Renames the restrict-plus-operands option checkCompoundAssignments to skipCompoundAssignments.
restrict-plus-operandscheckCompoundAssignmentsskipCompoundAssignments
Removes parseWithNodeMaps from typescript-estree.
parseWithNodeMaps
Makes BaseNode.parent non-optional.
BaseNode.parent
Reworks configs: recommended, strict, stylistic, and -type-checked.
recommendedstrictstylistic-type-checked
Removes the experimental-utils package.
experimental-utils
typescript-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.
RuleTester
Applies 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.
Deprecated4
Deprecates the formatting rules in the eslint-plugin.
Logs a console.warn when experimental-utils is imported.
experimental-utils
Deprecates the no-type-alias rule.
no-type-alias
Warns on deprecated AST property accesses in typescript-estree.

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[]>>