-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Missing meta.messages property #181
Comments
Thanks for the suggestion. Would you like to submit a PR to add this? |
I'm very new to ESLint and at this time I don't feel that I have the skills and experience to implement the suggestion. Sorry! I just noticed the issue as I was working on resolving a lot of eslint-plugin-cypress upgrade issues which I started on one month ago. |
So you want to add The template is here: generator-eslint/rule/templates/_rule.js Lines 13 to 22 in 92a44af
|
That would be a minimum and just adding that to the template would be easy to implement. What I wasn't sure about is how far this should be extended, and if it should be expanded to a dialog which asks for a |
I don't think the generator needs to fill in any actual messages. The rule creator probably doesn't have specific messages ready yet when they're just trying to create the barebones rule skeleton. |
So I suggest to add: messages: {} // Add messageId and message to the template. The linting message will stay the same, however adding the above line into the template means that rule creators should be able to find the place faster, where they need to add a message. No additional information is requested at rule creation time with Linting error:
If that sounds good, then I will submit a PR for this change. |
That sounds reasonable. |
Should this be a It doesn't change any error message, so from that point of view it could be a |
|
|
Suggestion
Support the recommended rule eslint-plugin/prefer-message-ids by providing a
meta.messages
property using a MessageId. Currently, runningyo eslint:rule
does not add this property to the generatedlib/rules/<rule-id>.js
rule.Background
Documentation
The text was updated successfully, but these errors were encountered: