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
no-unused-vars error message should provide hint on ignorePattern. #9171
Comments
I'm 👍 to this as long as we can find a way to shorten the message a bit. |
How do you feel about that? |
Works for me, thanks. |
I modified the tests to reflect the new error messages. If those look good, we can update the rule to make them pass. I just want to make sure I'm covering the cases and people are happy with it before putting in the work on the rule. |
What is the path forward to getting this tagged as "accepted" instead of "evaluating"? |
@TheSavior We will accept the issue when enough people on the ESLint core team have supported the issue that we have reached consensus. This means one champion and three 👍s from other team members. I'll champion. So we need two more 👍s (mine no longer counts). @eslint/eslint-team Anyone else want to support this? I think this would be a small but very useful improvement to the messaging for this rule. |
This is now accepted. |
Yay, great. Any more comments on the PR would be great, otherwise that is good to go as well. #9176 |
It looks like we missed the |
We use no-unused-vars but provide allowed patterns for ignored vars and args.
With this code:
We get this error:
It is unreasonable for our engineers to be aware of our allowed pattern in the configuration and this warning will instead cause people to go through lots of work and confusion to get eslint to pass, or they will just turn it off.
I think a more valuable warning message would be something like this:
The text was updated successfully, but these errors were encountered: