-
Notifications
You must be signed in to change notification settings - Fork 178
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Lint Name
jsx-curly-braces
Code Snippet
// 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.
Version
deno 2.2.2 (stable, release, x86_64-unknown-linux-gnu)
v8 13.4.114.9-rusty
typescript 5.7.3
lionel-rowe, KnorpelSenf and scarf005
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working