-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
react/jsx-curly-brace-presence deleting {' '} #2434
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
Comments
I believe this is fixed by #2431. |
Oh, awesome! I'll close this. |
Unfortunately, even #2437 didn't fix all cases that used to be correct before v7.15.0. <>
{'foo '}
<span>bar</span>
</>
(it can be trailling whitespaces on both sides) |
@daltones why do you need that case? this: <>
foo
<span>bar</span>
</> is the same, because all whitespace including newlines collapses in HTML down to one space. |
@ljharb yes, in HTML it would, not in JSX. Your example results in |
in that case, please file a new issue for that and we'll get it fixed. |
ref #2454 |
The latest update to
eslint-plugin-react
says that{' '}
violatesreact/jsx-curly-brace-presence
. Running--fix
will delete all instances of{' '}
.I don't believe this is appropriate, because in some cases, this is the only way to retain a regular space character between elements. Sure there is
and<span> </span>
, but those aren't quite the same.Thoughts?
The text was updated successfully, but these errors were encountered: