Skip to content

Commit

Permalink
Disallow unnecessary curly braces in JSX props and children. (react/j…
Browse files Browse the repository at this point in the history
…sx-curly-brace-presence)

Fixes: standard/standard#1366
  • Loading branch information
feross committed Aug 15, 2019
1 parent e9dfc10 commit f8cf1de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Disallow lexical declarations in case/default clauses ([no-case-declarations](https://eslint.org/docs/rules/no-case-declarations)) [#1211](https://github.com/standard/standard/issues/1211) [eslint-config-standard/#137](https://github.com/standard/eslint-config-standard/pull/137) [1%]
- Require the first JSX property to be placed on a new line if the JSX tag takes up multiple lines and there are multiple properties ([react/jsx-first-prop-new-line](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-first-prop-new-line.md)) [#696](https://github.com/standard/standard/issues/696) [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 import of modules using absolute paths ([import/no-absolute-path](https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-absolute-path.md)) [#861](https://github.com/standard/standard/issues/861) [#1343](https://github.com/standard/standard/issues/1343) [0%]
- Require no spaces before JSX closing brackets ([react/jsx-tag-spacing](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-tag-spacing.md)) [#1348](https://github.com/standard/standard/issues/1348) [eslint-config-standard-jsx/38](https://github.com/standard/eslint-config-standard-jsx/pull/38) [0%]
- Disallow multiple spaces between inline JSX props ([react/jsx-props-no-multi-spaces](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-multi-spaces.md)) [#1363](https://github.com/standard/standard/issues/1363) [0%]
Expand Down
1 change: 1 addition & 0 deletions eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"react/jsx-closing-bracket-location": ["error", "tag-aligned"],
"react/jsx-closing-tag-location": "error",
"react/jsx-first-prop-new-line": ["error", "multiline-multiprop"],
"react/jsx-curly-brace-presence": ["error", { "props": "never", "children": "never" }],
"react/jsx-pascal-case": ["error", { "allowAllCaps": false }],
"react/jsx-fragments": ["error", "syntax"],
"react/jsx-props-no-multi-spaces": "error",
Expand Down

0 comments on commit f8cf1de

Please sign in to comment.