Reputation: 1827
I would like to use airbnb styles ESLint. However, accessibility does not bring values in my project, and actually it add more noise to the code.
Is there a way to use AirBnb eslint but disable jsx-a11y
?
I can fork the AirBnb repo and delete the link, but just wonder if there is a better way.
Upvotes: 10
Views: 2733
Reputation: 348
Uninstall eslint-config-airbnb
, then install and use eslint-config-airbnb-base
, eslint-plugin-react
, and eslint-plugin-react-hooks
. If you also want TypeScript, install eslint-config-airbnb-typescript
as normal. Your eslint config should have changed from:
extends: [
'airbnb',
'airbnb-typescript'
]
to:
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'airbnb-base',
'airbnb-typescript'
]
Upvotes: 0
Reputation: 10629
If you are using Typescript, then change:
"extends": [
"airbnb-typescript"
],
To:
"extends": [
"eslint-config-airbnb-base",
"airbnb/rules/react"
],
Upvotes: 1
Reputation: 615
In your .eslintrc
you can change:
"extends": [
"airbnb"
]
to
"extends": [
"airbnb-base",
"airbnb/rules/react"
]
All credit goes to oustn
Upvotes: 9