Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
Recommended ESLint rules that are already handled by TypeScript are turned off inplugin:@typescript-eslint/recommended
.
The recommendedno-func-assign
rule should be included in the list as it triggers an ESLint as well as a TypeScript error.
Repro
{"extends": ["eslint:recommended","plugin:@typescript-eslint/eslint-recommended","plugin:@typescript-eslint/recommended" ]}
functionfoo(){}foo=bar;
Expected Result
A simple TypeScript error for line 2:
TS2539: Cannot assign to 'foo' because it is not a variable.
Actual Result
A duplicate error for line 2, one coming from TypeScript the other one coming from ESLint:
TS2539: Cannot assign to 'foo' because it is not a variable.
ESLint: 'foo' is a function.(no-func-assign)
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | 2.3.0 |
@typescript-eslint/parser | 2.3.0 |
TypeScript | 3.6.3 |
ESLint | 6.4.0 |
node | 10.16.3 |
npm | 6.9.0 |