Skip to content

Commit

Permalink
Disallow spaces inside of curly braces in JSX expressions in children…
Browse files Browse the repository at this point in the history
… (react/jsx-curly-spacing)

Fixes: standard/standard#1373
  • Loading branch information
feross committed Aug 15, 2019
1 parent 186e0ff commit 46513fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Require linebreaks in curly braces in JSX attributes and expressions to be consistent ([react/jsx-curly-newline](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-newline.md)) [#1372](https://github.com/standard/standard/issues/1372) [1%]
- Require JSX attributes and logical expressions to be indented correctly ([react/jsx-indent](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md)) [#1370](https://github.com/standard/standard/issues/1370) [1%]
- Require JSX event handler names to follow conventions ([react/jsx-handler-names](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-handler-names.md)) [#1371](https://github.com/standard/standard/issues/1371) [1%]
- Disallow spaces inside of curly braces in JSX expressions in children ([react/jsx-curly-spacing](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md)) [#1373](https://github.com/standard/standard/issues/1373) [1%]
- Require JSX closing bracket to be aligned with the opening tag ([react/jsx-closing-bracket-location](https://eslint.org/docs/rules/react/jsx-closing-bracket-location)) [#1361](https://github.com/standard/standard/issues/1361) [1%]
- Disallow unnecessary curly braces in JSX props and children ([react/jsx-curly-brace-presence](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md)) [#1366](https://github.com/standard/standard/issues/1366) [1%]
- Disallow missing `key` prop in JSX elements that likely require a `key` prop ([react/jsx-key](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-key.md)) [#1369](https://github.com/standard/standard/issues/1369) [1%]
Expand Down
5 changes: 5 additions & 0 deletions eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@

"react/jsx-closing-bracket-location": ["error", "tag-aligned"],
"react/jsx-closing-tag-location": "error",
"react/jsx-curly-spacing": ["error", {
"attributes": { "when": "never" },
"children": { "when": "never" },
"allowMultiline": true
}],
"react/jsx-curly-newline": ["error", { "multiline": "consistent", "singleline": "consistent" }],
"react/jsx-first-prop-new-line": ["error", "multiline-multiprop"],
"react/jsx-handler-names": "error",
Expand Down

0 comments on commit 46513fd

Please sign in to comment.