Releases: typescript-eslint/typescript-eslint
Releases · typescript-eslint/typescript-eslint
v2.3.3
v2.3.2
v2.3.1
v2.3.0
2.3.0 (2019-09-16)
Bug Fixes
Features
- eslint-plugin: [explicit-member-accessibility] add support of "ignoredMethodNames" (#895) (46ee4c9)
- eslint-plugin: [no-floating-promises] Add ignoreVoid option (#796) (6a55921)
- eslint-plugin: [no-magic-numbers] add ignoreReadonlyClassProperties option (#938) (aeea4cd)
- eslint-plugin: [strict-boolean-expressions] Add allowNullable option (#794) (c713ca4)
- eslint-plugin: add no-unnecessary-condition rule (#699) (5715482)
v2.2.0
v2.1.0
2.1.0 (2019-09-02)
Bug Fixes
- eslint-plugin: [member-naming] should match constructor args (#771) (b006667)
- eslint-plugin: [no-inferrable-types] ignore optional props (#918) (a4e625f)
- eslint-plugin: [promise-function-async] Allow async get/set (#820) (cddfdca)
- eslint-plugin: [require-await] Allow concise arrow function bodies (#826) (29fddfd)
- eslint-plugin: [typedef] don't flag destructuring when variables is disabled (#819) (5603473)
- eslint-plugin: [typedef] handle AssignmentPattern inside TSParameterProperty (#923) (6bd7f2d)
- eslint-plugin: [unbound-method] Allow typeof expressions (Fixes #692) (#904) (344bafe)
- eslint-plugin: [unbound-method] false positive in equality comparisons (#914) (29a01b8)
- eslint-plugin: [unified-signatures] type comparison and exported nodes (#839) (580eceb)
- eslint-plugin: readme typo (#867) (5eb40dc)
- typescript-estree: improve missing project file error msg (#866) (8f3b0a8), closes #853
Features
- [no-unnecessary-type-assertion] allow
as const
arrow functions (#876) (14c6f80) - eslint-plugin: [expl-func-ret-type] make error loc smaller (#919) (65eb993)
- eslint-plugin: [no-type-alias] support tuples (#775) (c68e033)
- eslint-plugin: add quotes [extension] (#762) (9f82099)
- typescript-estree: Accept a glob pattern for
options.project
(#806) (9e5f21e)
v2.0.0
2.0.0 (2019-08-13)
BREAKING CHANGES
- 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.
- parser / typescript-estree:
- When
project
is 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
includes
field within your tsconfig(s) so that all the files you want to lint are included. - Create a new
tsconfig.eslint.json
which you pass intoparserOptions.project
, which includes all of the files you want to lint, e.g.:If you are using non standard file extensions (i.e.{ // 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 } }
.vue
files), you should add the following config to your.eslintrc
file:{ "parserOptions": { "extraFileExtensions": [".vue"] } }
- Improve the
- When
- 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.
- Removed deprecated rule
prefer-interface
. This rule was replaced byconsistent-type-definitions
. - Removed deprecated rule
no-triple-slash-reference
. This rule was replaced bytriple-slash-reference
- Merged both
no-angle-bracket-type-assertion
andno-object-literal-type-assertion
into one rule -consistent-type-assertions
. explicit-function-return-type
no longer treatsexport default () => {}
as an expression for the purposes of theallowExpressions
option.- Changed a number of the default rule configs:
explicit-function-return-type
-allowTypedFunctionExpressions
andallowHigherOrderFunctions
are now bothtrue
by default.no-inferrable-types
-ignoreParameters
andignoreProperties
are now bothfalse
by default.no-this-alias
-allowDestructuring
is nowtrue
by default.
- Reworked the recommended configs:
plugin:@typescript-eslint/recommended
- This 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-checking
- This 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".
- This is a slightly expanded set of rules, intended to be used in conjunction with
plugin:@typescript-eslint/eslint-recommended
- This config is a compatibility config that disables rules from
eslint:recommended
which are already handled by TypeScript.
- This config is a compatibility config that disables rules from
plugin:@typescript-eslint/all
- 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" ] }
- Removed hardcoded checks which prevented some rules from running on non-TypeScript files (i.e. files that are not
Bug Fixes
- eslint-plugin: [efrt] flag default export w/
allowExpressions
(#831) (ebbcc01) - eslint-plugin: [no-explicit-any] Fix
ignoreRestArgs
for interfaces (#777) (22e9ae5) - eslint-plugin: [no-useless-constructor] handle bodyless constructor (#685) (55e788c)
- eslint-plugin: [prefer-readonly] TypeError when having computed member expression (#761) (211b1b5)
- eslint-plugin: [typedef] support
for..in
,for..of
(#787) (39e41b5) - eslint-plugin: [typedef] support default value for parameter (#785) (84916e6)
- eslint-plugin: add
Literal
toRuleListener
types (#824) (3c902a1) - typescript-estree: fix
is
token typed asKeyword
(#750) (35dec52) - typescript-estree: jsx comment parsing (#703) (0cfc48e)
- utils: add ES2019 as valid
ecmaVersion
(#746) (d11fbbe)
Features
- explicitly support eslint v6 (#645) (34a7cf6)
- eslint-plugin: [interface-name-prefix, class-name-casing] Add allowUnderscorePrefix option to support private declarations (#790) (0c4f474)
- eslint-plugin: [no-var-requires] report on foo(require('')) (#725) (b2ca20d), closes #665
- eslint-plugin: [promise-function-async] make allowAny default true (#733) (590ca50)
- eslint-plugin: [strict-boolean-expressions] add ignoreRhs option (#691) (fd6be42)
- eslint-plugin: add support for object props in CallExpressions (#728) (8141f01)
- eslint-plugin: added new rule typedef (#581) (35cc99b)
- eslint-plugin: added new rule use-default-type-parameter (#562) ([2b942ba](https://github.com/typescrip...
v1.13.0
1.13.0 (2019-07-21)
Bug Fixes
- Correct
@types/json-schema
dependency (#675) (a5398ce) - eslint-plugin: remove imports from typescript-estree (#706) (ceb2d32), closes #705
- eslint-plugin: undo breaking changes to recommended config (93f72e3)
- utils: move
typescript
from peer dep to dev dep (#712) (f949355) - utils: RuleTester should not require a parser (#713) (158a417)
Features
v1.12.0
1.12.0 (2019-07-12)
Bug Fixes
- eslint-plugin: handle
const;
(#633) (430d628), closes #441 - typescript-estree: fix
async
identifier token typed asKeyword
(#681) (6de19d3)
Features
- eslint-plugin: [ban-types] Support namespaced type (#616) (e325b72)
- eslint-plugin: [explicit-function-return-type] add handling for usage as arguments (#680) (e0aeb18)
- eslint-plugin: [no-explicit-any] Add an optional fixer (#609) (606fc70)
- eslint-plugin: Add rule triple-slash-reference (#625) (af70a59)
- eslint-plugin: add rule strict-boolean-expressions (#579) (34e7d1e)
- eslint-plugin: added new rule prefer-readonly (#555) (76b89a5)
v1.11.0
1.11.0 (2019-06-23)
Bug Fixes
- eslint-plugin: [no-magic-numbers] add support for enums (#543) (5c40d01)
- eslint-plugin: [promise-function-async] allow any as return value (#553) (9a387b0)
- eslint-plugin: Remove duplicated code (#611) (c4df4ff)
- parser: add simpleTraverse, replaces private ESLint util (#628) (aa206c4)
- typescript-estree: fix more cases with double slash in JSX text (#607) (34cfa53)