Upgrading @typescript-eslint/parser 4 to 5
Breaking4.33.0 → 5.62.0Breaking25Platform3Deprecated1New99Changed34Fixed167Other8
BreakingUpgrade verdict
22 breaking changes and 3 platform requirement changes.
In plain terms
- 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.
Must act 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.
What you must change
Breaking22
Removes
object from the default ban list of the ban-types rule.ban-typesAdds getter and setter support to member-ordering, which may change default sort orders.
member-orderingRemoves the SourceCode#getComments API from ESLint types.
SourceCode#getCommentsRemoves meta.docs.category from types and rules.
meta.docs.categoryRemoves the TSParenthesizedType node.
TSParenthesizedTypeRemoves the legacy useJSXTextNode option.
useJSXTextNodeRenames LineAndColumnData to Position.
LineAndColumnDataPositionRemoves object from the default types of the ban-types rule.
ban-typesRemoves the value from abstract property nodes in eslint-plugin.
Removes object from the default options of the ban-types rule.
ban-typesChanges the recommended rule set.
Makes explicit-member-accessibility check abstract members.
explicit-member-accessibilityDeletes the no-unused-vars-experimental rule in favor of @typescript-eslint/no-unused-vars.
no-unused-vars-experimental@typescript-eslint/no-unused-varsMakes CLIEngine conditionally undefined for ESLint v8 support.
CLIEngineESLintChanges .source of ExportNamedDeclaration, ExportAllDeclaration and ImportDeclaration to StringLiteral and adds parse-time errors.
ExportNamedDeclarationExportAllDeclarationImportDeclarationStringLiteralAligns class features AST with ESTree, renaming ClassProperty to PropertyDefinition and TSAbstractClassProperty to TSAbstractPropertyDefinition.
ClassPropertyPropertyDefinitionTSAbstractClassPropertyTSAbstractPropertyDefinitionMakes TSAbstractPropertyDefinition.value always null.
TSAbstractPropertyDefinition.valueChanges the source of ExportNamedDeclaration to Literal instead of Expression in typescript-estree.
ExportNamedDeclarationAligns class property representation with ESTree.
Removes the no-unused-vars-experimental rule.
no-unused-vars-experimentalRemoves
getComments from the ESLint SourceCode types in experimental-utils.getCommentsESLintSourceCodeAligns the comma-dangle rule schema with ESLint v8.
comma-danglePlatform3
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.
Deprecations to plan for
Deprecated1
Deprecates no-duplicate-imports in favour of import/no-duplicates.
no-duplicate-importsimport/no-duplicatesAPI changes
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 }