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": "never" option

See original GitHub issue

Hi, it would be cool, to have that option available.

I am working currently in a team, where the members decided to use that explicit syntax:

return <div>
  <div />
</div>

I tried no-extra-parens but it did’t worked for return statements. So I am here 😉

Would be nice to have the never option like:

"react/jsx-wrap-multilines": ["error", "never"]

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:8
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
ljharbcommented, Jan 20, 2017

Gotcha, that makes sense and seems reasonable (although I personally find “never wrap” repulsive).

We’d need to change the schema so it accepted an optional string “always”|“never” before the object, and when the string was omitted (with or without the object), “always” was assumed.

0reactions
craigcosmocommented, Sep 4, 2021

What does the explicit syntax mean ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

"react/jsx-wrap-multilines": "never" option · Issue #1035 - GitHub
Hi, it would be cool, to have that option available. I am working currently in a team, ... "react/jsx-wrap-multilines": "never" option #1035.
Read more >
Eslint error: Missing parentheses around multilines JSX react ...
Please, see the examples on the jsx-wrap-multilines rule page: You can either disable that rule, or wrap any multiline React element into ...
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 >
Why do we need parentheses around multi-line JSX ...
Answer. We want to use parentheses around multi-line JSX expressions to make sure we are avoiding JavaScript's automatic semicolon insertion ...
Read more >
Introducing JSX - React
We split JSX over multiple lines for readability. While it isn't required, when doing this, we also recommend wrapping it in parentheses to...
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