@typescript-eslint/parser
8.72.1 · 26 Oct 2026MIT180.1M / weekRepositoryHomepagenpmAtom feed
2.34.0 is the newest release of 2.x.
In short
6 breaking1 removed16 new8 fixed12 changed
- breaking
Node 6 is no longer supported.
- breaking
eslint-plugin: Removed hardcoded checks which prevented some rules from running on non-TypeScript files (i.e. files that are not
*.ts/*.tsx). - breaking
eslint-plugin: Removed deprecated rule
prefer-interface. This rule was replaced byconsistent-type-definitions. - breaking
eslint-plugin: Removed deprecated rule
no-triple-slash-reference. This rule was replaced bytriple-slash-reference - breaking
eslint-plugin: Merged both
no-angle-bracket-type-assertionandno-object-literal-type-assertioninto one rule -consistent-type-assertions. - breaking
eslint-plugin:
explicit-function-return-typeno longer treatsexport default () => {}as an expression for the purposes of theallowExpressionsoption. - removed
eslint-plugin: remove deprecated rules
Release note
Breaking changes
- breaking
Node 6 is no longer supported.
Node 6 is now end of life. With the release of ESLint v6, they have dropped support for Node 6. As such, we have also dropped Node 6 from our testing pipeline. Please consider upgrading to a supported version of Node. See this page for more information about node version lifecycle and dates.
- breaking
parser / typescript-estree:
When
projectis specified withinparserOptions, we will now hard fail when parsing files that are not included within the provided tsconfig(s).We discovered that this was a common performance pitfall, and could increase lint times by huge amounts.
To handle this, there are a few possible solutions:
Improve the
includesfield within your tsconfig(s) so that all the files you want to lint are included.Create a new
tsconfig.eslint.jsonwhich you pass intoparserOptions.project, which includes all of the files you want to lint, e.g.:{ // extend your base config so you don't have to redefine your compilerOptions "extends": "./tsconfig.json", "include": [ "src/**/*.ts", "test/**/*.ts", "typings/**/*.ts" // etc ], // IF (and only if) you have a mixed JS/TS codebase - you should also turn on JS support "compilerOptions": { "allowJs": true, "checkJs": true } }If you are using non standard file extensions (i.e.
.vuefiles), you should add the following config to your.eslintrcfile:{ "parserOptions": { "extraFileExtensions": [".vue"] } }
- breaking
eslint-plugin: Removed hardcoded checks which prevented some rules from running on non-TypeScript files (i.e. files that are not
*.ts/*.tsx).Some users with mixed TS/JS codebases may now see some TypeScript-specific rules being reported against JS files.
Please use ESLint's
"overrides"config to select which files to apply rules to.
- breaking
eslint-plugin: Removed deprecated rule
prefer-interface. This rule was replaced byconsistent-type-definitions. - breaking
eslint-plugin: Removed deprecated rule
no-triple-slash-reference. This rule was replaced bytriple-slash-reference - breaking
eslint-plugin: Merged both
no-angle-bracket-type-assertionandno-object-literal-type-assertioninto one rule -consistent-type-assertions. - breaking
eslint-plugin:
explicit-function-return-typeno longer treatsexport default () => {}as an expression for the purposes of theallowExpressionsoption. - breaking
eslint-plugin: Changed a number of the default rule configs:
explicit-function-return-type-allowTypedFunctionExpressionsandallowHigherOrderFunctionsare now bothtrueby default.no-inferrable-types-ignoreParametersandignorePropertiesare now bothfalseby default.no-this-alias-allowDestructuringis nowtrueby default.
- breaking
eslint-plugin: Reworked the recommended configs:
plugin:@typescript-eslint/recommendedThis is our slim, recommended set of rules. This config does not require type information, so it can be easily dropped into an existing config.
plugin:@typescript-eslint/recommended-requiring-type-checkingThis is a slightly expanded set of rules, intended to be used in conjunction with
plugin:@typescript-eslint/recommended. These rules specifically require type information. We separated these rules into a separate config to ease adoption and to make the baserecommended"fast-by-default".
plugin:@typescript-eslint/eslint-recommendedThis config is a compatibility config that disables rules from
eslint:recommendedwhich are already handled by TypeScript.
This config simply turns on every single rule available in the plugin.
The intention is that you can use all the configs together, as they build upon one-another:
{ "extends": [ "eslint:recommended", "plugin:@typescript-eslint/eslint-recommended", "plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended-requiring-type-checking" ] }
Bug Fixes
eslint-plugin: [efrt] flag default export w/
allowExpressionseslint-plugin: [no-explicit-any] Fix
ignoreRestArgsfor interfaceseslint-plugin: [no-useless-constructor] handle bodyless constructor
eslint-plugin: [prefer-readonly] TypeError when having computed member expression
eslint-plugin: [typedef] support
for..in,for..ofeslint-plugin: [typedef] support default value for parameter
eslint-plugin: add
LiteraltoRuleListenertypestypescript-estree: fix
istoken typed asKeywordtypescript-estree: jsx comment parsing
utils: add ES2019 as valid
ecmaVersion
Features
Explicitly support eslint v6
eslint-plugin: [interface-name-prefix, class-name-casing] Add allowUnderscorePrefix option to support private declarations
eslint-plugin: [no-var-requires] report on foo(require('')) (#725) (b2ca20d), closes #665
eslint-plugin: [promise-function-async] make allowAny default true
eslint-plugin: [strict-boolean-expressions] add ignoreRhs option
eslint-plugin: add support for object props in CallExpressions
eslint-plugin: added new rule typedef
eslint-plugin: added new rule use-default-type-parameter
eslint-plugin: move opinionated rules between configs
- removed
eslint-plugin: remove deprecated rules
eslint-plugin: [array-type] rework options (#654) (1389393), closes #654 #635
eslint-plugin: add rule
consistent-type-assertions(#731) (92e98de), closes #731eslint-plugin: change recommended config (#729) (428567d), closes #729
eslint-plugin: recommended-requiring-type-checking config (#846) (d3470c9), closes #846
typescript-estree: throw error on file not in project when
projectset (#760) (3777b77), closes #760