Skip to content

Files

Latest commit

 

History

History
25 lines (17 loc) · 951 Bytes

react-tsx-curly-spacing.md

File metadata and controls

25 lines (17 loc) · 951 Bytes

Pattern: Malformed curly spacing for JSX attribute

Issue: -

Description

Consistently use spaces around the brace characters of JSX attributes. You can either allow or ban spaces between the braces and the values they enclose.
One of the two following options are required:

  • "always" enforces a space inside of curly braces (default)
  • "never" disallows spaces inside of curly braces

Configuration

By default, braces spanning multiple lines are not allowed with either setting. If you want to allow them you can specify an additional allowMultiline property with the value false.

Examples:

  • "react-tsx-curly-spacing": [true, "always"]
  • "react-tsx-curly-spacing": [true, "never"]
  • "react-tsx-curly-spacing": [true, "never", {"allowMultiline": false}]

Further Reading