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
Feature request: [no-shadow] It would really help, if the error message would show where the original identifier has been defined #13646
Closed
doberkofler opened this issue
Sep 1, 2020
· 4 comments
· Fixed by #13841, pzhlkj6612/action-js-qt-windows-msvc-mingw-version-info-generator#1, neo-hack/action-jscpdrs#1, DDDEastMidlandsLimited/dddem-web#218 or Sidoine/Ovale#844
Closed
Feature request: [no-shadow] It would really help, if the error message would show where the original identifier has been defined #13646
doberkofler opened this issue
Sep 1, 2020
· 4 comments
· Fixed by #13841, pzhlkj6612/action-js-qt-windows-msvc-mingw-version-info-generator#1, neo-hack/action-jscpdrs#1, DDDEastMidlandsLimited/dddem-web#218 or Sidoine/Ovale#844
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
enhancement
This change enhances an existing feature of ESLint
rule
Relates to ESLint's core rules
Comments
Thanks for the issue Make sense to me. |
Makes sense to me, too. I'll champion this. |
t-mangoe
added a commit
to t-mangoe/eslint
that referenced
this issue
Nov 14, 2020
I have worked on this issue. |
1 task
1 task
t-mangoe
added a commit
to t-mangoe/eslint
that referenced
this issue
Nov 21, 2020
This is a nice improvement |
t-mangoe
added a commit
to t-mangoe/eslint
that referenced
this issue
Jan 16, 2021
t-mangoe
added a commit
to t-mangoe/eslint
that referenced
this issue
Jan 16, 2021
t-mangoe
added a commit
to t-mangoe/eslint
that referenced
this issue
Jan 23, 2021
btmills
pushed a commit
that referenced
this issue
Jan 30, 2021
This was referenced Mar 5, 2021
This was referenced Mar 17, 2021
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
archived due to age
This issue has been archived; please open a new issue for any further discussion
enhancement
This change enhances an existing feature of ESLint
rule
Relates to ESLint's core rules
doberkofler commentedSep 1, 2020
What rule do you want to change?
no-shadow
Does this change cause the rule to produce more or fewer warnings?
The same
How will the change be implemented? (New option, new default behavior, etc.)?
Just a change in the error message
Please provide some example code that this change will affect:
In my experience, the
no-shadow
rule could greatly benefit from an error message that also describes where the identifier has already been defined and not only where the redefinition has occurred.What does the rule currently do for this code?
The error
3:9 - 'a' is already declared in the upper scope. (no-shadow)
explains thata
has already be declared somewhere but not exactly where the original declaration has been made.What will the rule do after it's changed?
An improved error like
3:9 - 'a' is already declared in the upper scope 1:5. (no-shadow)
would additionally inform that the original definition is in line 1 column 5 and greatly improved the experience.Are you willing to submit a pull request to implement this change?
Not sure if I have the required skills.
Versions
ESLint
7.8.0
node
14.8.0
The text was updated successfully, but these errors were encountered: