You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 2 inline elements in single line can be separated by a space which will leave a text node in dom<foo/><bar/>// But the same 2 elements put on new lines will have the text node stripped<foo/><bar/>// To separate them in the same way as before, a space has to be forced like so<foo/>{' '}<bar/>
Expected Result
{' '} doesn't produce a linter warning
Actual Result
Found curly braces around JSX child literal
Additional Info
When you enforce a line length, {' '} becomes a pretty common case concatenating long strings with JSX elements. The most common case is probably having a word in a sentence wrapped in a link where the value of href often causes the link to stand on its own line and then you have to force spaces around.
Lint Name
jsx-curly-braces
Code Snippet
Expected Result
{' '}
doesn't produce a linter warningActual Result
Additional Info
When you enforce a line length,
{' '}
becomes a pretty common case concatenating long strings with JSX elements. The most common case is probably having a word in a sentence wrapped in a link where the value ofhref
often causes the link to stand on its own line and then you have to force spaces around.Version
The text was updated successfully, but these errors were encountered: