Solvedjavascript react/jsx-wrap-multilines arrow rule breaking eslint.

Dependencies:

    "eslint": "^3.19.0",
    "eslint-config-airbnb": "^15.0.1",
    "eslint-plugin-import": "^2.3.0",
    "eslint-plugin-jsx-a11y": "^5.0.3",
    "eslint-plugin-react": "^7.0.1",

I'm getting this error in my eslint:

Error: [snip]/node_modules/eslint-config-airbnb/rules/react.js:
	Configuration for rule "react/jsx-wrap-multilines" is invalid:
	Value "data["0"].arrow" has additional properties.

Referenced from: airbnb
Referenced from: [snip]/.eslintrc.json

Error: [snip]/node_modules/eslint-config-airbnb/rules/react.js:
	Configuration for rule "react/jsx-wrap-multilines" is invalid:
	Value "data["0"].arrow" has additional properties.

Referenced from: airbnb
Referenced from: [snip]/.eslintrc.json

It appears to be caused by this line. If I disable it, the problem goes away.

Is anyone else experiencing this problem?

22 Answers

✔️Accepted Answer

( export PKG=eslint-config-airbnb; npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest" )

Other Answers:

I can't really confirm that react-scripts of version below 1 cause this problem. I have react-scripts@0.8.5, and it works just fine. Worked until recently.

As @ljharb recommended,

npm ls

actually is a one stop solution. It immediately shows all the missing peer dependencies and makes it quite clear what exact versions are expected to be installed. In my case,

"eslint": "^3.15.0",
"eslint-config-airbnb": "latest",
"eslint-plugin-import": "^2.2.0",
-"eslint-plugin-jsx-a11y": "^4.0.0",
-"eslint-plugin-react": "^6.9.0",
+"eslint-plugin-jsx-a11y": "^5.1.1",
+"eslint-plugin-react": "^7.1.0",
"react-scripts": "0.8.5"

did the trick.

Reinstall airbnb using the peer deps worked :D thanks

It does appear to be an IDE issue in my case, the command line worked fine. Thanks for help with debugging, @ljharb, I'll wait on IntelliJ to get its act together. ;)

More Issues: