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

Update: highlight last write reference for no-unused-vars (fixes #14324) #14335

Merged
merged 6 commits into from Apr 23, 2021
Merged

Update: highlight last write reference for no-unused-vars (fixes #14324) #14335

merged 6 commits into from Apr 23, 2021

Conversation

snitin315
Copy link
Contributor

@snitin315 snitin315 commented Apr 17, 2021

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[x] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)

Fixes #14324
Highlight the last write reference instead of just highlighting the last reference.

Is there anything you'd like reviewers to focus on?

@eslint-github-bot eslint-github-bot bot added the triage An ESLint team member will look at this issue soon label Apr 17, 2021
@snitin315 snitin315 marked this pull request as ready for review Apr 17, 2021
nzakas
nzakas approved these changes Apr 20, 2021
Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Would like another reviewer to take a look just to double check.

@mdjermanovic mdjermanovic added accepted There is consensus among the team that this change meets the criteria for inclusion bug ESLint is working incorrectly rule Relates to ESLint's core rules and removed triage An ESLint team member will look at this issue soon labels Apr 21, 2021
lib/rules/no-unused-vars.js Outdated Show resolved Hide resolved
lib/rules/no-unused-vars.js Outdated Show resolved Hide resolved
lib/rules/no-unused-vars.js Outdated Show resolved Hide resolved
lib/rules/no-unused-vars.js Outdated Show resolved Hide resolved
@snitin315
Copy link
Contributor Author

@mdjermanovic I have applied your suggestions 👍🏻

@mdjermanovic mdjermanovic changed the title Fix: highlight last write reference for no-unused-vars (fixes #14324) Update: highlight last write reference for no-unused-vars (fixes #14324) Apr 22, 2021
@eslint-github-bot
Copy link

Hi @snitin315!, thanks for the Pull Request

The pull request title isn't properly formatted. We ask that you update the message to match this format, as we use it to generate changelogs and automate releases.

  • The length of the commit message must be less than or equal to 72

Read more about contributing to ESLint here

@mdjermanovic mdjermanovic changed the title Update: highlight last write reference for no-unused-vars (fixes #14324) Update: highlight last write reference for no-unused-vars (fixes #14324) Apr 22, 2021
@mdjermanovic
Copy link
Member

Changed the PR title to start with Update:, because a change of the reported line can produce more errors in some cases with eslint-disable comments.

Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mdjermanovic mdjermanovic merged commit 5df5e4a into eslint:master Apr 23, 2021
13 checks passed
@mdjermanovic
Copy link
Member

Thanks for contributing!

@snitin315 snitin315 deleted the no-unused-var branch Apr 23, 2021
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Oct 21, 2021
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Oct 21, 2021
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 bug ESLint is working incorrectly rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

no-unused-vars highlights at wrong position
3 participants