Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"react/jsx-wrap-multilines": "never" option #1035

Closed
ghost opened this issue Jan 20, 2017 · 5 comments · Fixed by #3668
Closed

"react/jsx-wrap-multilines": "never" option #1035

ghost opened this issue Jan 20, 2017 · 5 comments · Fixed by #3668

Comments

@ghost
Copy link

ghost commented Jan 20, 2017

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"]

@ljharb
Copy link
Member

ljharb commented Jan 20, 2017

@webdeb Would "never" mean that you can't ever have multiline jsx?

@ghost
Copy link
Author

ghost commented Jan 20, 2017

"never" would mean, never wrap jsx in parentheses.

@ljharb
Copy link
Member

ljharb commented 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.

@seb-thomas
Copy link

Don't know if it's helpful but see (converse) discussion in Standard for more examples: standard/standard#710

@craigcosmo
Copy link

What does the explicit syntax mean ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants