Skip to content

Commit

Permalink
More easier plugin:jsx-a11y/{recommended,strict} configs
Browse files Browse the repository at this point in the history
This makes setting `plugins` unnecessary when using `plugin:jsx-a11y/***` configs.

Before
------

```json
{
  "extends": ["plugin:jsx-a11y/recommended"],
  "plugins": ["jsx-a11y"]
}
```

After
-----

```json
{
  "extends": ["plugin:jsx-a11y/recommended"]
}
```

For example, `eslint-plugin-react` has a similar behavior:

https://github.com/yannickcr/eslint-plugin-react/blob/3008e85553b0ba66f396e2d6690eea420838bfec/index.js#L117
  • Loading branch information
ybiquitous committed Nov 7, 2018
1 parent 93265cb commit 0f6a8af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ module.exports = {
},
configs: {
recommended: {
plugins: [
'jsx-a11y',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
Expand Down Expand Up @@ -160,6 +163,9 @@ module.exports = {
},
},
strict: {
plugins: [
'jsx-a11y',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
Expand Down

0 comments on commit 0f6a8af

Please sign in to comment.