New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[no-shadow] False positive when declaring any TypeScript enum #2466
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Oh wait I'm so sorry. I completely misunderstood and misread this. Hmm... There's a passing test for this in master ( typescript-eslint/packages/eslint-plugin/tests/rules/no-shadow.test.ts Lines 435 to 440 in ffdfade
|
I had the same issue as @Kenadia. I realized that I was actually using
|
Got it, this is my mistake then, I'm sorry. I was reading through #325 (led there by Google) and didn't realize that a |
I got confused as well.
-> I think it would have been more obvious to mention the full name (@typescript-eslint/no-shadow) |
Thanks for the heads up! I'll update the release note. |
When I add: '@typescript-eslint/no-shadow': ['error'], I get one of these errors for each of my .ts source files:
Why isn't the fix working for me? I believe I'm using the latest versions of all relevant packages: "@typescript-eslint/parser": "^4.0.1",
"eslint": "^7.8.1",
"eslint-plugin-github": "^4.1.1",
"eslint-plugin-jest": "^23.20.0", |
You need to install |
Thanks. Should that be added to the release notes, @bradzacher? |
We generally make the assumption that you're using both the parser and plugin together. Your project does have our plugin installed, but it's installed as a transient dependency via |
Repro
Full minimal repro here: https://github.com/Kenadia/no-shadow-eslint-enum-test.
Expected Result
No error.
Actual Result
Additional Info
Versions
@typescript-eslint/parser
4.0.1
TypeScript
4.0.2
ESLint
7.8.0
node
12.18.3
The text was updated successfully, but these errors were encountered: