Skip to content
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 for enum #2360

Closed
mshustov opened this issue Aug 6, 2020 · 0 comments · Fixed by #2374 or #2330
Closed

[no-shadow] False positive for enum #2360

mshustov opened this issue Aug 6, 2020 · 0 comments · Fixed by #2374 or #2330
Assignees
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Milestone

Comments

@mshustov
Copy link

mshustov commented Aug 6, 2020

Repro

I created a repo to reproduce the problem https://github.com/restrry/typescript-eslint-scope-bug

{
  "rules": {
    "@typescript-eslint/no-shadow": "error"
  }
}
enum Direction {
    left = 'left',
    right = 'right',
}

Expected Result
No errors reported.

Actual Result
1:6 error 'Direction' is already declared in the upper scope @typescript-eslint/no-shadow

Versions

package version
@typescript-eslint/eslint-plugin 4.0.0-alpha.5
@typescript-eslint/parser 4.0.0-alpha.5
TypeScript 3.9.5
ESLint 6.8.0
node 10.21.0
npm N/A
yarn 1.21.1
@mshustov mshustov added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Aug 6, 2020
@bradzacher bradzacher added this to the 4.0.0 milestone Aug 6, 2020
@bradzacher bradzacher added bug Something isn't working and removed triage Waiting for maintainers to take a look labels Aug 6, 2020
@bradzacher bradzacher self-assigned this Aug 6, 2020
@bradzacher bradzacher linked a pull request Aug 9, 2020 that will close this issue
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
2 participants