We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md
We already require no spaces inside of JSX expression in attributes, i.e. <Hello name={firstname} /> instead of <Hello name={ firstname } />.
<Hello name={firstname} />
<Hello name={ firstname } />
I want to enforce the same rule for JSX expressions in children.
Before:
"react/jsx-curly-spacing": ["error", "never"],
After:
"react/jsx-curly-spacing": ["error", { "attributes": { "when": "never" }, "children": { "when": "never" }, "allowMultiline": true }],
The following patterns are considered warnings:
<Hello name={ firstname } />; <Hello name={ firstname} />; <Hello name={firstname } />; <Hello>{ firstname }</Hello>;
The following patterns are not warnings:
<Hello name={firstname} />; <Hello name={{ firstname: 'John', lastname: 'Doe' }} />; <Hello name={ firstname } />; <Hello>{firstname}</Hello>; <Hello>{ firstname }</Hello>;
The text was updated successfully, but these errors were encountered:
Shipping in standard 14.
standard
Sorry, something went wrong.
c1ebec6
Disallow spaces inside of curly braces in JSX expressions in children…
46513fd
… (react/jsx-curly-spacing) Fixes: standard/standard#1373
No branches or pull requests
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md
We already require no spaces inside of JSX expression in attributes, i.e.
<Hello name={firstname} />
instead of<Hello name={ firstname } />
.I want to enforce the same rule for JSX expressions in children.
Before:
After:
The following patterns are considered warnings:
The following patterns are not warnings:
The text was updated successfully, but these errors were encountered: