I have CRA and i want install custom eslint (airbnb), but after installing it triggers an error
warning Definition for rule 'jsx-a11y/img-has-alt' was not found jsx-a11y/img-has-alt
package.json
...
"eslint-config-airbnb": "^15.0.1",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^5.0.1",
"eslint-plugin-react": "^7.0.1",
create-app-react - 3.10.10
.eslintrc
"extends": [
"airbnb"
],
"plugins": [
"import",
"react",
"jsx-a11y"
],
"env": {
"browser": true,
"node": true,
"jest": true
},
"rules": {
"comma-dangle": ["error", "never"],
"jsx-a11y/img-has-alt": [0],
"jsx-quotes": ["error", "prefer-single"],
"no-confusing-arrow": [0],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/jsx-no-bind": [0],
"react/prop-types": [1],
"react/require-default-props": [0]
}
edit: npm said that eslint-config-airbnb needs jsx-a11y v5.0.1