-
-
Notifications
You must be signed in to change notification settings - Fork 75
no-dupe-args and no-redeclare false positives in 20.1.0 #535
Comments
I'm experiencing this issue as well after updating my vue-cli ts deps to latest. |
Thank you for this report. I wonder we can disable both rules |
That's my solution right now. Turn them off. |
This is happening for a ton of stuff, including
And a code example:
Is this related to the eslint visitor keys change? |
Yes. As I mentioned on #516 (comment), the change changed traversal in scope analysis, too. (I had assumed people has disabled rules of variables because I will try to fix the scope analysis soon. |
There are issues with this rule and `typescript-eslint-parser` `v20.1.0` and later (eslint/typescript-eslint-parser#535). Because `var` is not used through the code, this rule can be safely disabled, avoid the false positives and stil use the latest version of the parser. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Fix: #1468
There are issues with this rule and `typescript-eslint-parser` `v20.1.0` and later¹. Because `var` is not used through the code, this rule can be safely disabled, avoid the false positives and stil use the latest version of the parser. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ¹ eslint/typescript-eslint-parser#535 Fix #1468
@mysticatea strictly speaking, TypeScript does not verify no-redeclare always. This is not an error in TS:
|
* Update: add proper scope analysis (fixes #535) * add computed-properties-in-type fixture * add computed-properties-in-interface fixture * add function-overload fixture * add method-overload fixture * add class-properties fixture * add decorators fixture * update visitor-keys * add declare-global fixture * fix typo * add test for typeof in array destructuring * add namespace fixture * add declare-module fixture * fix crash * add declare-function.ts fixture * add abstract-class fixture * add typeof-in-call-signature fixture * add test for #416 * add test for #435 * add test for #437 * add test for #443 * add test for #459 * add test for #466 * add test for #471 * add test for #487 * add test for #535 * add test for #536 * add test for #476 * fix test to use `expect()`
Just stumbled upon this too, would be great to have it ignore TS syntax. |
@mysticatea thank you! |
What version of TypeScript are you using?
3.1.4
What version of
typescript-eslint-parser
are you using?20.1.0
What code were you trying to parse?
What did you expect to happen?
No errors.
What happened?
The text was updated successfully, but these errors were encountered: