Closed
Description
We love the airbnb style guide, including the react stuff. But we don't want any of the a11y rules.
I saw this, which makes me think it would be relatively easy to only include a11y
through some configuration:
module.exports = {
extends: [
'eslint-config-airbnb-base', // want this
'eslint-config-airbnb-base/rules/strict', // want this
'./rules/react', // want this
'./rules/react-a11y', // don't want this
].map(require.resolve),
rules: {}
};
The other option would be to include each item independently, but it would require the react
rules to be published separately:
module.exports = {
extends: [
'airbnb-base',
'airbnb-base/rules/strict',
'airbnb-react' // doesn't actually exist
]
}
When we try to just access airbnb-react
via the eslint-config-airbnb
package, it still requires eslint-plugin-jsx-a11y
due to the way modules are resolved:
module.exports = {
extends: [
'airbnb-base',
'airbnb-base/rules/strict',
'airbnb/rules/react'
]
}
Throws an error
ESLint couldn't find the plugin "eslint-plugin-jsx-a11y". This can happen for a couple different reasons...
Our workaround is to install eslint-plugin-jsx-a11y
even though it's not used, and include each item independently like above. This works, but forces us to include the extra dependency that we don't want or need.
Any suggestions?
Metadata
Metadata
Assignees
Labels
No labels