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: fix no-unused-vars false negative with comma operator #14928

Merged
merged 2 commits into from Aug 21, 2021

Conversation

ersachin3112
Copy link
Contributor

@ersachin3112 ersachin3112 commented Aug 14, 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)

Fix #14866

Report z as unused variable for the following case -

/*eslint no-unused-vars: "error"*/

var z = 0;
z=z+1, z=2;

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

No

@eslint-github-bot eslint-github-bot bot added the triage An ESLint team member will look at this issue soon label Aug 14, 2021
Copy link
Contributor

@snitin315 snitin315 left a comment

I think we have a false positive

lib/rules/no-unused-vars.js Outdated Show resolved Hide resolved
tests/lib/rules/no-unused-vars.js Show resolved Hide resolved
@snitin315 snitin315 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 Aug 14, 2021
Copy link
Contributor

@snitin315 snitin315 left a comment

LGTM

Copy link
Member

@mdjermanovic mdjermanovic left a comment

LGTM, thanks for contributing!

@mdjermanovic mdjermanovic merged commit f110926 into eslint:master Aug 21, 2021
13 checks passed
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Feb 18, 2022
@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 Feb 18, 2022
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 false negative with comma operator
3 participants