eslint-config-airbnb v16.0.0 doesn't work with CRA after eject
See original GitHub issuehttps://github.com/James2516/eslint-airbnb The repo is created with create-react-app + npm run eject.
Running npm i && npm start
gives an error:
./src/index.js
Module build failed: Error: /Users/a/Desktop/eslint-not-working/node_modules/eslint-config-airbnb/rules/react.js:
Configuration for rule "react/jsx-boolean-value" is invalid:
Value "never,[object Object]" should NOT have more than 1 items.
Referenced from: /Users/a/Desktop/eslint-not-working/node_modules/eslint-config-airbnb/index.js
Referenced from: /Users/a/Desktop/eslint-not-working/.eslintrc
at Array.forEach (<anonymous>)
at Array.reduceRight (<anonymous>)
at Array.reduceRight (<anonymous>)
This only happens with v16.0.0.
Issue Analytics
- State:
- Created 6 years ago
- Comments:11
Top Results From Across the Web
[eslint] failed to load config "react-app" to extend from
To solve your error message, you can simply remove the entry or replace it with a proper shared config (e.g. "eslint-config-airbnb" ).
Read more >Is eslint pre-commit hook in CRA bootstrapped application ...
0.0 ) and I want to add a code formatter (prettier to be specific) that must format the code before committing the changes...
Read more >How To Customize ESLint Rules with an Ejected Create ...
Since their rules are a little strict to start with, we're going to start with something a little simpler. Open package.json in your...
Read more >How to add a custom ESLint configuration to a Create React ...
Go to package.json at the root of the project, and remove the eslintConfig object. Add ESLint configuration.
Read more >eslint/eslint - Gitter
"ESLint couldn't find the config "airbnb-base/legacy" to extend from. ... local packages in all projects and instaled them as global but it doesn't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same issue here.
“eslint-config-airbnb”: “^16.1.0”, “eslint-plugin-jsx-a11y”: “6.0.2”,
Found the issue. After ejecting CRA, there is a dep on eslint-config-react-app which depends on an earlier version of eslint-plugin-jsx-a11y. After removing eslint-config-react-app, and moving all eslint deps to dev-deps, everything started working as expected.