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.

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

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:23
  • Comments:21 (2 by maintainers)

github_iconTop GitHub Comments

21reactions
ibigpapacommented, Jun 13, 2017

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

9reactions
taxigycommented, Jul 18, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESLint `no-confusing-arrow` "--fix" formatting conflict on save ...
According to this answer, you ought to just disable no-confusing-arrow , since the benefit of that rule is already captured by Prettier's ...
Read more >
eslint-plugin-react | Yarn - Package Manager
Require or prevent a new line after jsx elements and expressions.. jsx-no-bind, Disallow .bind() or arrow functions in JSX props.
Read more >
Rules - ESLint - Pluggable JavaScript Linter
Rules in ESLint are grouped by type to help you understand their purpose. ... unreachable code after `return`, `throw`, `continue`, and `break` statements....
Read more >
eslint-plugin-coffee - npm
ESLint -included rules; CoffeeScript-specific rules; eslint-plugin-react ... coffee/jsx-wrap-multilines, Prevent missing parentheses around multilines JSX
Read more >
Wrap Multiline JSX
This prevents syntax errors and improves the readability and convenience. ESLint:react/jsx-wrap-multilines. Examples. ⇣ Incorrect code for this rule: render() ...
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