"react/jsx-wrap-multilines": "never" option
See original GitHub issueHi, 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:
- Created 7 years ago
- Reactions:8
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
What does the explicit syntax mean ?