-
-
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
Rule: valid usage of messageId #57
Comments
Thanks, I think both of these ideas sound good. I agree that the second bullet point should be added to |
I tried to dive into resolving the second bullet point a few weeks ago, but felt like I was in a little over my head. I'm becoming more familiar with the ESLint APIs and working with rules, so I'm still interested in giving this another shot in the coming weeks. If you end up tackling this, let me know, but reaching out to let you know this is still on my radar. 😄 |
The second bullet point should be handled by #252. For the first bullet point (check if messageIds exist and are used) we have a few options:
|
ESLint v4.15.0 introduced
messageId
. Looking at this code sample:I would want a rule that:
messageId
used incontext.report()
matches a key inmeta.messages
(in this example,avoidName
)meta.messages[messageId]
contains a placeholder, it matchesdata[placeholderName]
(in this example,{{ name }}
matchesdata.name
)I'm wondering if the second bullet point should be added to
eslint-plugin/no-unused-placeholders
or as part of a new rule. I think the first case makes sense as its own rule.What are your thoughts on this? I'd be happy to work on a pull request this week - looking for feedback on if this would be valuable and how to best include these features into this plugin. Thanks!
The text was updated successfully, but these errors were encountered: