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: incorrect error messages of no-unused-vars (fixes #9774) #9791
Conversation
Remove varsIgnorePattern incorrectly included in error messages of no-unused-vars.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Could you please point me to a valid test where the argsIgnorePattern allows an unused argument, and also to an invalid test where the argsIgnorePattern shows up in the error message? (I assume these exist already but if they don't, please add them.) Thanks!
One of the former is https://github.com/eslint/eslint/blob/master/tests/lib/rules/no-unused-vars.js#L160 and one of the latter is https://github.com/eslint/eslint/blob/master/tests/lib/rules/no-unused-vars.js#L342. |
Thank you! I'll go ahead and approve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! I am satisfied that the test coverage is where it needs to be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for PR.
thanks for contributing! O(∩_∩)O |
What is the purpose of this pull request? (put an "X" next to 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 #9774.
It showed
Allowed unused vars must match {varsIgnorePattern}.
for an unused argument withoutargsIgnorePattern
specified.Is there anything you'd like reviewers to focus on?