You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will help ensure consistency around spacing around props in JSX syntax. In other words, we shouldn't have a mix and match of code that looks like:
<MyComponent {...props} status={status}/>
<MyComponent { ...props } status={ status }/>
I would recommend implementing this rule as a warning instead of error, because the rule itself has issues which has created annoyances in the community: jsx-eslint/eslint-plugin-react#857
It only lints against props, not child objects (values and variables for other React component instances)
In other words, curly spacing around the child object in this component would not be ignored and pass linting:
As with all ESLint rules, stricter rules help readability of the code and make integrating changes smoother, because we won't see comments about this type of code in PRs.
The text was updated successfully, but these errors were encountered:
This is a proposal to implement the
react/jsx-curly-spacing
from https://github.com/yannickcr/eslint-plugin-reactThis will help ensure consistency around spacing around props in JSX syntax. In other words, we shouldn't have a mix and match of code that looks like:
I would recommend implementing this rule as a
warning
instead oferror
, because the rule itself has issues which has created annoyances in the community:jsx-eslint/eslint-plugin-react#857
As with all ESLint rules, stricter rules help readability of the code and make integrating changes smoother, because we won't see comments about this type of code in PRs.
The text was updated successfully, but these errors were encountered: