Skip to content

Upgrading @typescript-eslint/parser 4 to 5

Breaking4.33.0 → 5.62.0Breaking25Platform3Deprecated1New99Changed34Fixed167Other8

BreakingUpgrade verdict

22 breaking changes and 3 platform requirement changes.

  • Removes `object` from the default ban list of the ban-types rule.
  • Adds getter and setter support to member-ordering, which may change default sort orders.
  • Removes the SourceCode#getComments API from ESLint types.
  • Removes meta.docs.category from types and rules.
Top 5 of 26 that need code or config changes

Node.js requirement changed in 5.0.0-alpha.17: ^10.12.0 || >=12.0.0 → ^12.22.0 || ^14.17.0 || >=16.0.0.

Breaking22
Removes object from the default ban list of the ban-types rule.
ban-types
Adds getter and setter support to member-ordering, which may change default sort orders.
member-ordering
Removes the SourceCode#getComments API from ESLint types.
SourceCode#getComments
Removes meta.docs.category from types and rules.
meta.docs.category
Removes the TSParenthesizedType node.
TSParenthesizedType
Removes the legacy useJSXTextNode option.
useJSXTextNode
Renames LineAndColumnData to Position.
LineAndColumnDataPosition
Removes object from the default types of the ban-types rule.
ban-types
Removes the value from abstract property nodes in eslint-plugin.
Removes object from the default options of the ban-types rule.
ban-types
Changes the recommended rule set.
Makes explicit-member-accessibility check abstract members.
explicit-member-accessibility
Deletes the no-unused-vars-experimental rule in favor of @typescript-eslint/no-unused-vars.
no-unused-vars-experimental@typescript-eslint/no-unused-vars
Makes CLIEngine conditionally undefined for ESLint v8 support.
CLIEngineESLint
Changes .source of ExportNamedDeclaration, ExportAllDeclaration and ImportDeclaration to StringLiteral and adds parse-time errors.
ExportNamedDeclarationExportAllDeclarationImportDeclarationStringLiteral
Aligns class features AST with ESTree, renaming ClassProperty to PropertyDefinition and TSAbstractClassProperty to TSAbstractPropertyDefinition.
ClassPropertyPropertyDefinitionTSAbstractClassPropertyTSAbstractPropertyDefinition
Makes TSAbstractPropertyDefinition.value always null.
TSAbstractPropertyDefinition.value
Changes the source of ExportNamedDeclaration to Literal instead of Expression in typescript-estree.
ExportNamedDeclaration
Aligns class property representation with ESTree.
Removes the no-unused-vars-experimental rule.
no-unused-vars-experimental
Removes getComments from the ESLint SourceCode types in experimental-utils.
getCommentsESLintSourceCode
Aligns the comma-dangle rule schema with ESLint v8.
comma-dangle
Platform3
Adds support for TypeScript 5.1.
Drops support for Node v10; required node version is now ^12.22.0 || ^14.17.0 || >=16.0.0.
Adds support for ESLint v8.
Deprecated1
Deprecates no-duplicate-imports in favour of import/no-duplicates.
no-duplicate-importsimport/no-duplicates

Generated by DepDelta from published .d.ts files. Not mixed with prose notes.

  • added: const meta: { name: string; version: string }
  • added: const version: string
  • added: export { ParserOptions } from './parser'
  • added: export { ParserServices } from '@typescript-eslint/typescript-estree'
  • added: export { clearCaches } from '@typescript-eslint/typescript-estree'
  • added: export { createProgram } from '@typescript-eslint/typescript-estree'
  • added: export { parse } from './parser'
  • added: export { parseForESLint } from './parser'
  • added: export { ParserOptions }
  • added: function parse(code: string, options?: ParserOptions): ParseForESLintResult['ast']
  • added: function parseForESLint(code: string, options?: ParserOptions | null): ParseForESLintResult
  • added: const meta: { name: string; version: string }