Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upDisallow unnecessary curly braces in JSX props and children. (react/jsx-curly-brace-presence) #1366
Comments
feross
added
enhancement
accepted
labels
Aug 15, 2019
feross
added this to the standard 14 milestone
Aug 15, 2019
feross
closed this
in
30eddfa
Aug 15, 2019
This comment has been minimized.
This comment has been minimized.
|
Shipping in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
feross commentedAug 15, 2019
•
edited
This rule allows you to disallow unnecessary curly braces in JSX props and children.
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-brace-presence.md
When
{ props: "never", children: "never" }is set, the following patterns will be given warnings.They can be fixed to:
will be warned and fixed to:
The following patterns will not be given a warning even if
'never'is passed.