Upgrading @typescript-eslint/parser 2 to 3
Breaking2.34.0 → 3.10.1Breaking26Platform1New21Changed11Fixed49
BreakingUpgrade verdict
25 breaking changes and a platform requirement change.
In plain terms
- Updates the eslint-recommended, recommended and recommended-requiring-typechecking configs with added and removed rules.
- Reworks the ban-types default ban list and removes fixers that caused user issues.
- Sets the no-floating-promises ignoreVoid option to true by default.
- Removes the ignoreRHS option from no-unnecessary-condition; the rule now only checks the RHS in boolean contexts.
Must act Top 4 of 26 that need code or config changes
Node.js requirement changed in 3.0.0-alpha.23: ^8.10.0 || ^10.13.0 || >=11.10.1 → ^10.12.0 || >=12.0.0.
Adds @typescript-eslint/types 3.10.1.
Installs 31 packages in all (was 29).
What you must change
Breaking25
Updates the eslint-recommended, recommended and recommended-requiring-typechecking configs with added and removed rules.
eslint-recommendedrecommendedrecommended-requiring-typecheckingReworks the ban-types default ban list and removes fixers that caused user issues.
ban-typesSets the no-floating-promises ignoreVoid option to true by default.
no-floating-promisesignoreVoidRemoves the ignoreRHS option from no-unnecessary-condition; the rule now only checks the RHS in boolean contexts.
no-unnecessary-conditionignoreRHSRemoves the checkArrayPredicates option from no-unnecessary-condition; array predicate functions are now always checked.
no-unnecessary-conditioncheckArrayPredicatesConverts the prefer-nullish-coalescing fixer to always be a suggestion fixer and removes the forceSuggestionFixer option.
prefer-nullish-coalescingforceSuggestionFixerConverts the prefer-optional-chain fixer to always be a suggestion fixer and removes the suggestInsteadOfAutofix option.
prefer-optional-chainsuggestInsteadOfAutofixSets the restrict-template-expressions allowNumber option to true by default.
restrict-template-expressionsallowNumberRenames the restrict-template-expressions allowNullable option to allowNullish.
restrict-template-expressionsallowNullableallowNullishCompletely reworks strict-boolean-expression with more configurability, smarter defaults and more intuitive logic.
strict-boolean-expressionRemoves the deprecated ban-ts-ignore rule in favor of ban-ts-comment.
ban-ts-ignoreban-ts-commentRemoves the deprecated camelcase rule in favor of naming-convention.
camelcasenaming-conventionRemoves the deprecated class-name-casing rule in favor of naming-convention.
class-name-casingnaming-conventionRemoves the deprecated generic-type-naming rule in favor of naming-convention.
generic-type-namingnaming-conventionRemoves the deprecated interface-name-prefix rule in favor of naming-convention.
interface-name-prefixnaming-conventionRemoves the deprecated member-naming rule in favor of naming-convention.
member-namingnaming-conventionRemoves the deprecated no-untyped-public-signatures rule in favor of explicit-module-boundary-types.
no-untyped-public-signaturesexplicit-module-boundary-typesOptional methods now mark the MethodDefinition/TSAbstractMethodDefinition as optional instead of the key, fixing computed keys.
MethodDefinitionTSAbstractMethodDefinitionImport expressions now output as an ImportExpression per the new ESTree spec.
ImportExpressionBigInt literals now output as a Literal with a value of type bigint per the new ESTree spec.
LiteralparserServices are now always emitted regardless of parserOptions.project, with a new hasFullTypeInformation flag.
parserServicesparserOptions.projectAdds parserServices.hasFullTypeInformation, true when parserOptions.project is configured and false otherwise.
parserServices.hasFullTypeInformationparserOptions.projectMarks SourceCode.isSpaceBetween as optional since it is only available in ESLint v6+.
SourceCode.isSpaceBetweenCustom parserServices resolvers must be updated; getParserServices from experimental-utils handles the change automatically.
getParserServicesReworks ESLint types in experimental-utils to more closely match the ESLint library.
Platform1
Drops explicit support for Node version 8, which has been end of life since 2019-12-31.
API changes
Generated by DepDelta from published .d.ts files. Not mixed with prose notes.
- 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 { parse } from './parser' - added:
export { parseForESLint } from './parser'
- removed:
const Syntax: Readonly<typeof AST_NODE_TYPES> - removed:
const version: any - removed:
export { ParserServices } - removed:
export { clearCaches } from '@typescript-eslint/typescript-estree' - removed:
type ParserOptions = TSESLint.ParserOptions - added:
export { ParserOptions }
- removed:
type ParserOptions = TSESLint.ParserOptions - added:
export { ParserOptions } from '@typescript-eslint/types'