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.

Errors while integration: no-confusing-arrow & max-len with react and {' '} space before a tag

See original GitHub issue

Versions:

  • prettier-eslint version: 4.1.1
  • node version: 8.0.0
  • npm version: 4.6.1

Have you followed the debugging tips?

Yes

What I did:

After I lauchend ./node_modules/.bin/eslint --print-config .eslintrc.js | ./node_modules/.bin/prettier-eslint --trailing-comma none --write ./src/**/*.js in my project, I get errors when running ./node_modules/.bin/eslint -c .eslintrc src

What happened:

/home/bertho/dev/react-redux-universal-hot-example/src/containers/About/About.js
  9:14  error  Arrow function used ambiguously with a conditional expression  no-confusing-arrow

/home/bertho/dev/react-redux-universal-hot-example/src/containers/Widgets/Widgets.js
  66:1   error  Line 66 exceeds the maximum line length of 120                 max-len
  90:17  error  Arrow function used ambiguously with a conditional expression  no-confusing-arrow

Reproduction repository:

https://github.com/bertho-zero/react-redux-universal-hot-example

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
bertho-zerocommented, Jul 18, 2017

No, my glob is expanded by prettier-eslint, I have created an example here: max-len example.

And do you know why the parentheses of certain arrow functions are removed? no-confusing-arrow example.

0reactions
kentcdoddscommented, Jul 18, 2017

You should probably also know about this issue

My recommendation is you disable the max-len rule in eslint and just rely on prettier to make everything a reasonable length for you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jsx-tag-spacing doesn't allow for forbid a space before ">" in a ...
In our project we have the need for forbidding spaces before the ">" symbol in a start ... Configuration for rule "react/jsx-tag-spacing" is...
Read more >
JSX In Depth - React
Specifying The React Element Type. The first part of a JSX tag determines the type of the React element. Capitalized types indicate that...
Read more >
Best practice when adding whitespace in JSX - Stack Overflow
I don't know that there is a defined "best practice" -- certainly you don't need to wrap everything in <span> tags, but I...
Read more >
Render a String with Non-breaking Spaces in React | Pluralsight
This guide explores the solution to a simple problem often encountered while dealing with strings: rendering them without spaces using some ...
Read more >
&nbsp and HTML Space Challenges and Tricks | Mailtrap Blog
or non-breaking space, is an HTML character used to create a space. We analyze when to use it and when to opt for...
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