-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
False positive with no-unused-message-ids
when violation reporting is done with external helper function
#283
Comments
I've encountered the issue in it's really helpful to ignore these cases, at least it can be an option. 👍 |
Edge case: a rule that calls Suggestion: how about disabling when the rule can see that a value set to |
it sounds it's guessing the user's wants, while it's not always reliable. I'm 👍 to @bmish 's suggestion. |
That's definitely a valid edge case. Regarding your suggestion, I'm open to it as a further improvement, especially if we start seeing real-world examples of that edge case, but note that there could be false negatives from it. Also we would want to limit that suggestion to external/imported functions that we can't analyze. |
In this example, the
context.report()
calls are all in a separate helper file, so we can't detect that themessageId
s are used.We should ignore this situation where we can't find any
context.report()
calls.https://github.com/typescript-eslint/typescript-eslint/blob/b6e5413fb12c2b1943a288b514f864c339380388/packages/eslint-plugin/src/rules/naming-convention.ts#L11
The text was updated successfully, but these errors were encountered: