Skip to content

Upgrading @typescript-eslint/parser 7 to 8

Breaking7.18.0 โ†’ 8.72.1Breaking28Platform5Deprecated7New94Changed77Fixed413Other8

BreakingUpgrade verdict

28 breaking changes and 5 platform requirement changes.

  • Removes an error type that was previously deprecated.
  • The prefer-nullish-coalescing rule now ignores conditional tests by default.
  • Project file matching now includes dot globs by default.
  • All formatting and layout lint rules have been removed from the plugin.
Top 5 of 40 that need code or config changes

Node.js requirement changed in 8.0.0-alpha.2: ^18.18.0 || >=20.0.0 โ†’ ^18.18.0 || ^20.9.0 || >=21.1.0.

Installs 17 packages in all (was 36).

Breaking28
Removes an error type that was previously deprecated.
Changes prefer-nullish-coalescing ignoreConditionalTests default to true.
prefer-nullish-coalescingignoreConditionalTests
Enables dot globs for project by default in typescript-estree.
project
Removes formatting and layout rules from eslint-plugin.
Removes slow deprecated and isolated programs from typescript-estree.
Renames automaticSingleRunInference to disallowAutomaticSingleRunInference.
automaticSingleRunInferencedisallowAutomaticSingleRunInference
Removes deprecated type params from ast-spec.
Removes the IsNullableTypeOptions interface from type-utils.
IsNullableTypeOptions
Removes EXPERIMENTAL_useSourceOfProjectReferenceRedirect from typescript-estree.
EXPERIMENTAL_useSourceOfProjectReferenceRedirect
Removes the no-useless-template-literals rule from eslint-plugin.
no-useless-template-literals
Removes getTokenAtPosition from type-utils.
getTokenAtPosition
Disables the checkThenables option by default for the no-floating-promises rule in v8.
no-floating-promisescheckThenables
Removes the deprecated no-throw-literal rule from eslint-plugin.
no-throw-literal
Removes deprecated context helpers from utils.
Changes the type of UnaryExpression.prefix to always be true.
UnaryExpression.prefix
Tightens the types of ArrowFunction, YieldExpression and TSTypePredicate.
ArrowFunctionYieldExpressionTSTypePredicate
scope-manager changes the unhelpful aaa error message and makes analyze expect a Program.
analyzeProgram
Replaces the attributes property with options in the TSImportType AST spec node.
TSImportTypeattributesoptions
Splits TSMappedType typeParameter into separate constraint and key properties.
TSMappedTypetypeParameter
Parser always enables comment, loc, range, and tokens options.
commentlocrangetokens
Adds a TSEnumBody node for the TSEnumDeclaration body.
TSEnumBodyTSEnumDeclaration
Aligns no-unused-vars catch behavior to ESLint 9.
no-unused-vars
Swaps LegacyESLint out for FlatESLint as the ESLint export in utils.
LegacyESLintFlatESLintESLint
Splits no-empty-object-type out from ban-types and no-empty-interfaces.
no-empty-object-typeban-typesno-empty-interfaces
Allows specifying additional rule meta.docs in RuleCreator.
RuleCreatormeta.docs
Applies initial config changes for v8 in eslint-plugin.
Replaces ban-types with no-restricted-types, no-unsafe-function-type, and no-wrapper-object-types.
ban-typesno-restricted-typesno-unsafe-function-typeno-wrapper-object-types
Switches rule-tester to flat config.
rule-tester
Platform5
Adds TypeScript as a peer dependency of rule-tester.
rule-tester
Adds support for TypeScript 6.
Adds support for TypeScript 5.8.
Adds support for TypeScript 5.7.
Adds support for TypeScript 5.6.
Deprecated7
Deprecates the no-restricted-imports extension rule in eslint-plugin.
no-restricted-imports
Deprecates the no-loop-func rule and adds support for using / await using declarations.
no-loop-funcusingawait using
Deprecates defaultOptions in utils in favor of meta.defaultOptions.
defaultOptionsmeta.defaultOptions
Deprecates TestCaseError#type and LintMessage#nodeType in rule-tester.
TestCaseError#typeLintMessage#nodeType
Deprecates tseslint.config() in favor of defineConfig.
tseslint.config()defineConfig
Deprecates the getSourceFileOfNode function in type-utils.
getSourceFileOfNode
Deprecates the no-loss-of-precision extension rule.
no-loss-of-precision

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

  • removed: export { ParserOptions }
  • changed: function parse(code: ts.SourceFile | string, options?: ParserOptions): ParseForESLintResult['ast'] โ†’ function parse(code: string | ts.SourceFile, options?: ParserOptions): ParseForESLintResult['ast']
  • changed: function parseForESLint(code: ts.SourceFile | string, options?: ParserOptions | null): ParseForESLintResult โ†’ function parseForESLint(code: string | ts.SourceFile, parserOptions?: ParserOptions | null): ParseForESLintResult
  • added: export { ParserOptions } from '@typescript-eslint/types'