-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Chore: Adopt eslint-plugin/prefer-message-ids
rule internally
#14841
Chore: Adopt eslint-plugin/prefer-message-ids
rule internally
#14841
Conversation
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.
👍
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.
It makes sense to enable eslint-plugin/prefer-message-ids
, as it catches some things that internal-rules/consistent-meta-messages
doesn't (e.g., someone could define meta.messages
but still mistakenly use message
in context.report()
).
However, it doesn't work for rules where context
is passed to functions that eventually call context.report()
, like no-duplicate-imports
or padding-lines-between-statements
, so maybe we should use both the plugin rule and the internal rule?
It is true that we can't always detect all usages of UPDATE: fix in eslint-community/eslint-plugin-eslint-plugin#173. |
Makes sense to me 👍 |
@mdjermanovic I have updated the rule to handle that case so this PR is ready to be merged :) |
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[ ] Documentation update
[ ] 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
[X] Other, please explain:
What changes did you make? (Give an overview)
The public rule eslint-plugin/prefer-message-ids is more robust than our internal version, and it's also valuable for us to dogfood this public rule as it's the same one that third-party plugin authors will use. So this PR deletes our custom version and switches us to the public rule for internal usage.
Follow-up to #14823.
CC: @aladdin-add
Is there anything you'd like reviewers to focus on?
No.