-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
jsx-one-expression-per-line confusion #1855
Comments
This was referenced Jun 26, 2018
For something like
I'd probably use a template literal to preserve whitespace:
Not exactly an improvement though, and makes the code harder to understand. In other places I add |
I believe #1848 will cover this. |
21 tasks
Closing in favor of #1848. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm finding this documentation to be a little confusing: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-one-expression-per-line.md
Specifically, examples in both the invalid and valid sections are actually just invalid JSX. Here's one example from both the invalid and valid sections:
Should this be
<Hello />
instead?Also, the examples and test cases leave a lot of things out. For instance, what about this code:
How will this rule treat this code? Or something a little more complex:
This seems to get autofixed in a way that removes meaningful whitespace, which seems like a bug. I thought about putting up a failing test case for this, but after looking at the documentation for the rule, I'm not really sure I understand the scope and purpose of it.
The text was updated successfully, but these errors were encountered: