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

fix(eslint-plugin): [no-shadow] fix false-positive on enum declaration #2374

Merged
merged 1 commit into from Aug 8, 2020

Conversation

bradzacher
Copy link
Member

Fixes #2360

@bradzacher bradzacher added the bug Something isn't working label Aug 8, 2020
@typescript-eslint
Copy link
Contributor

Thanks for the PR, @bradzacher!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day.

@bradzacher bradzacher linked an issue Aug 8, 2020 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Aug 8, 2020

Codecov Report

Merging #2374 into v4 will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##               v4    #2374   +/-   ##
=======================================
  Coverage   92.98%   92.99%           
=======================================
  Files         286      286           
  Lines        9041     9046    +5     
  Branches     2515     2517    +2     
=======================================
+ Hits         8407     8412    +5     
  Misses        304      304           
  Partials      330      330           
Flag Coverage Δ
#unittest 92.99% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/eslint-plugin/src/rules/no-shadow.ts 98.52% <100.00%> (+0.11%) ⬆️

@bradennapier
Copy link

did this regress or is it not released yet? all enums report no-shadow for me still on latest versions of everything.

@Kenadia
Copy link

Kenadia commented Sep 1, 2020

did this regress or is it not released yet? all enums report no-shadow for me still on latest versions of everything.

@bradennapier You may need to set the following rules:

'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],

@derekparsons718
Copy link

It's unfortunate that the changelog does not indicate that the no-shadow rule was added. This PR is listed as a bugfix in the changelog, and makes it sound like the bug was simply fixed, instead of indicating that a new rule must be added to your config:

image

Not sure if this is something you want to address, but as more people make the switch to v4 I think it would help to have the changelog show that there is a new rule that replaces eslint's no-shadow -- probably in the "features" section of v4.0.0, the same way that consistent-type-imports is listed as a new rule.

There have already been several issues created because users don't know that the new rule is available when they upgrade.

@bradzacher
Copy link
Member Author

bradzacher commented Sep 4, 2020

The changelog is just an auto-generated log of commits bundled in each release.

Prefer the github release notes which are curated and explain in detail:
https://github.com/typescript-eslint/typescript-eslint/releases/tag/v4.0.0

I'll add a link to this doc. I kinda want to just delete these files though as they're just noise.

There have already been several issues created because users don't know that the new rule is available when they upgrade

There's a larger problem with users not using the search. It's a huge problem with github as a whole.

@derekparsons718
Copy link

Totally makes sense. I just didn't realize that was where I needed to look, and apparently at least a few other people had the same problem, so I thought I would point it out :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[no-shadow] False positive for enum
4 participants