Skip to content
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

Require linebreaks in curly braces in JSX attributes and expressions to be consistent (react/jsx-curly-newline) #1372

Closed
feross opened this issue Aug 15, 2019 · 1 comment

Comments

@feross
Copy link
Member

commented Aug 15, 2019

https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md

We want either both curly braces have a line break directly inside them, or no line breaks are present.

When consistent or { multiline: "consistent", singleline: "consistent" } is set, the following patterns are considered warnings:

<div>
  { foo
  }
</div>

<div>
  {
    foo }
</div>

<div>
  { foo &&
    foo.bar
  }
</div>

The following patterns are not warnings:

<div>
  { foo }
</div>

<div>
  {
    foo
  }
</div>

@feross feross added this to the standard 14 milestone Aug 15, 2019

@feross

This comment has been minimized.

Copy link
Member Author

commented Aug 15, 2019

Shipping in standard 14.

@feross feross closed this in 2d619f3 Aug 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant
You can’t perform that action at this time.