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 plugin typo in configs #984

Merged
merged 1 commit into from Nov 30, 2016
Merged

Fix plugin typo in configs #984

merged 1 commit into from Nov 30, 2016

Conversation

jamischarles
Copy link
Contributor

ESLint looks for the plugins config property. Currently, if you extend plugin:react/recommended you still need to add plugins: ['react'].

This commit fixes the typo, so you no longer need to add the plugins prop when you extend recommended or all configs.

Before:

 1:1  error  Definition for rule 'react/no-find-dom-node' was not found          react/no-find-dom-node
 1:1  error  Definition for rule 'react/display-name' was not found              react/display-name
 1:1  error  Definition for rule 'react/jsx-no-undef' was not found              react/jsx-no-undef

After:

 28:21  error  'items' is missing in props validation      react/prop-types
 28:27  error  'items.map' is missing in props validation  react/prop-types

ESLint looks for the `plugins` config property. Currently, if you extend `plugin:react/recommended` you still need to add `plugins: ['react']`.

This commit fixes that, so you no longer need to add the plugins prop when you extend `recommended` or `all` configs.
@ljharb
Copy link
Member

ljharb commented Nov 30, 2016

@jamischarles what version of eslint are you using? I thought both plugin and plugins were supported.

@jamischarles
Copy link
Contributor Author

jamischarles commented Nov 30, 2016 via email

@ljharb
Copy link
Member

ljharb commented Nov 30, 2016

It would be good to confirm whether this worked in some versions of eslint, or if it never worked.

@jamischarles
Copy link
Contributor Author

jamischarles commented Nov 30, 2016

@ljharb As far as I can tell this never worked. I went back as far as 2.x: https://github.com/eslint/eslint/blob/2.x/lib/config/config-file.js#L504

I was unable to find any code that references plugin. The only place plugin is singular is the cli: option --plugin [String] Specify plugins

@ljharb
Copy link
Member

ljharb commented Nov 30, 2016

Thanks, good enough for me.

@ljharb ljharb merged commit 333938f into jsx-eslint:master Nov 30, 2016
@jamischarles
Copy link
Contributor Author

Thx 👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants