Skip to content

fix: jsx_curly_braces flagging trailing space expression#1388

Merged
marvinhagemeister merged 2 commits intomainfrom
jsx-curly-end
Jan 27, 2025
Merged

fix: jsx_curly_braces flagging trailing space expression#1388
marvinhagemeister merged 2 commits intomainfrom
jsx-curly-end

Conversation

@marvinhagemeister
Copy link
Contributor

@marvinhagemeister marvinhagemeister commented Jan 24, 2025

The jsx-curly-braces rule should not flag string literal expression children when they're at the end of a line and a child is following after it. This is a common pattern to preserve whitespace as HTML whitespace rules would trim it otherwise.

// Valid
<div>
  foo{" "}
  <span />
</div>

@kitsonk
Copy link
Contributor

kitsonk commented Jan 27, 2025

Just found this one too, so won't open an issue.

@marvinhagemeister marvinhagemeister merged commit 0271405 into main Jan 27, 2025
4 checks passed
@marvinhagemeister marvinhagemeister deleted the jsx-curly-end branch January 27, 2025 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants