javascript: 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?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 23
- Comments: 21 (2 by maintainers)
( export PKG=eslint-config-airbnb; npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest" )
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,
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,
did the trick.
Reinstall airbnb using the peer deps worked 😄 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. 😉
Yeah I had restarted a few times, ended up rolling back to previous dependencies of yours from another project and atom got friendly again.
I’ll try upgrading again, if I’m the only one reporting it it must have been user error 😃
I had the same issue, but in my case the problem was the
react-scripts@0.9.5
dependency witch have theeslint-plugin-react@6.4.1
dependency. I was able to fix this by updating thereact-scripts
to^1.0.10
version.npm install
fixed the problem in vscode. thanks @ljharb