jsx-curly-newline
UnreleasedConfiguration
Enforce consistent line breaks immediately inside curly braces in JSX attributes and expressions.
Rule Details
This rule checks both braces of every JSX expression container. It can require,
forbid, or keep consistent the newline directly after { and directly before
}. Comments are preserved: a diagnostic adjacent to a comment may not be
autofixable.
Examples of incorrect code with the default "consistent" option:
Examples of correct code:
Rule Options
The default is "consistent", an alias for:
"never" is an alias for { "singleline": "forbid", "multiline": "forbid" }. Alternatively, use an object with independently configured
singleline and multiline values: "consistent", "require", or
"forbid".
With "require", both immediate brace boundaries must have newlines. With
"forbid", neither boundary may have one. With "consistent", the right
boundary follows the existing state of the left boundary.