question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

eslint-config-airbnb v16.0.0 doesn't work with CRA after eject

See original GitHub issue

https://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:closed
  • Created 6 years ago
  • Comments:11

github_iconTop GitHub Comments

8reactions
yummyelincommented, Oct 20, 2017

Same issue here.

“eslint-config-airbnb”: “^16.1.0”, “eslint-plugin-jsx-a11y”: “6.0.2”,

6reactions
heyitshannescommented, Oct 26, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found