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

eslint-plugin: Include WordPress plugin in React ruleset #18457

Merged
merged 1 commit into from
Nov 12, 2019

Conversation

aduth
Copy link
Member

@aduth aduth commented Nov 12, 2019

Fixes #17635

This pull request resolves an issue where using the React ruleset may cause an error, since the configured rules references a custom WordPress rule, without also including the plugin in the plugins array. Any reference to our custom rules in rulesets must also include plugins: [ '@wordpress' ], for when those rulesets are used in isolation.

See custom.js:

plugins: [
'@wordpress',
],

Testing Instructions:

Repeat steps to reproduce from #17635, verifying that no error occurs.

@aduth aduth added [Type] Bug An existing feature does not function as intended [Package] ESLint plugin /packages/eslint-plugin labels Nov 12, 2019
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@aduth aduth merged commit d4ee580 into master Nov 12, 2019
@aduth aduth deleted the fix/17635-eslint-extend-custom-rules branch November 12, 2019 21:13
@youknowriad youknowriad added this to the Gutenberg 7.0 milestone Nov 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] ESLint plugin /packages/eslint-plugin [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Definition for rule '@wordpress/no-unused-vars-before-return' was not found
3 participants