Upgrading @typescript-eslint/parser 7 to 8
Breaking7.18.0 โ 8.72.1Breaking28Platform5Deprecated7New94Changed77Fixed413Other8
BreakingUpgrade verdict
28 breaking changes and 5 platform requirement changes.
In plain terms
- 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.
Must act 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).
What you must change
Breaking28
Removes an error type that was previously deprecated.
Changes prefer-nullish-coalescing ignoreConditionalTests default to true.
prefer-nullish-coalescingignoreConditionalTestsEnables dot globs for project by default in typescript-estree.
projectRemoves formatting and layout rules from eslint-plugin.
Removes slow deprecated and isolated programs from typescript-estree.
Renames automaticSingleRunInference to disallowAutomaticSingleRunInference.
automaticSingleRunInferencedisallowAutomaticSingleRunInferenceRemoves deprecated type params from ast-spec.
Removes the IsNullableTypeOptions interface from type-utils.
IsNullableTypeOptionsRemoves EXPERIMENTAL_useSourceOfProjectReferenceRedirect from typescript-estree.
EXPERIMENTAL_useSourceOfProjectReferenceRedirectRemoves the no-useless-template-literals rule from eslint-plugin.
no-useless-template-literalsRemoves getTokenAtPosition from type-utils.
getTokenAtPositionDisables the checkThenables option by default for the no-floating-promises rule in v8.
no-floating-promisescheckThenablesRemoves the deprecated no-throw-literal rule from eslint-plugin.
no-throw-literalRemoves deprecated context helpers from utils.
Changes the type of
UnaryExpression.prefix to always be true.UnaryExpression.prefixTightens the types of
ArrowFunction, YieldExpression and TSTypePredicate.ArrowFunctionYieldExpressionTSTypePredicatescope-manager changes the unhelpful
aaa error message and makes analyze expect a Program.analyzeProgramReplaces the attributes property with options in the TSImportType AST spec node.
TSImportTypeattributesoptionsSplits TSMappedType typeParameter into separate constraint and key properties.
TSMappedTypetypeParameterParser always enables comment, loc, range, and tokens options.
commentlocrangetokensAdds a TSEnumBody node for the TSEnumDeclaration body.
TSEnumBodyTSEnumDeclarationAligns no-unused-vars catch behavior to ESLint 9.
no-unused-varsSwaps LegacyESLint out for FlatESLint as the ESLint export in utils.
LegacyESLintFlatESLintESLintSplits no-empty-object-type out from ban-types and no-empty-interfaces.
no-empty-object-typeban-typesno-empty-interfacesAllows specifying additional rule meta.docs in RuleCreator.
RuleCreatormeta.docsApplies 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-typesSwitches rule-tester to flat config.
rule-testerPlatform5
Adds TypeScript as a peer dependency of rule-tester.
rule-testerAdds support for TypeScript 6.
Adds support for TypeScript 5.8.
Adds support for TypeScript 5.7.
Adds support for TypeScript 5.6.
Deprecations to plan for
Deprecated7
Deprecates the no-restricted-imports extension rule in eslint-plugin.
no-restricted-importsDeprecates the no-loop-func rule and adds support for
using / await using declarations.no-loop-funcusingawait usingDeprecates defaultOptions in utils in favor of meta.defaultOptions.
defaultOptionsmeta.defaultOptionsDeprecates TestCaseError#type and LintMessage#nodeType in rule-tester.
TestCaseError#typeLintMessage#nodeTypeDeprecates tseslint.config() in favor of defineConfig.
tseslint.config()defineConfigDeprecates the getSourceFileOfNode function in type-utils.
getSourceFileOfNodeDeprecates the no-loss-of-precision extension rule.
no-loss-of-precisionAPI changes
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'