Skip to content
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

Fix: False negative in prefer-message-ids rule #173

Merged

Conversation

bmish
Copy link
Member

@bmish bmish commented Jul 29, 2021

In some rules, context is passed to functions that eventually call context.report(), like no-duplicate-imports or padding-lines-between-statements, and that will prevent this existing rule from flagging such instances of context.report({ message: ... });.

So in addition to flagging that, we should also flag when rules are simply missing meta.messages, as all rules using message IDs should have at least one violation message defined in that object.

This will unblock this PR: eslint/eslint#14841 (comment)

CC: @mdjermanovic

@bmish bmish force-pushed the prefer-message-ids-empty-messages branch from 7d2b29b to e7b9b84 Compare July 29, 2021 22:05
Copy link
Contributor

@aladdin-add aladdin-add left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@aladdin-add aladdin-add merged commit c5c4b62 into eslint-community:master Jul 30, 2021
@aladdin-add
Copy link
Contributor

released in v3.5.3. 🍺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants