react/jsx-props-no-multi-spaces
eslint-plugin-react
Safe autofix
eslint.config.js
import react from "eslint-plugin-react";
export default [
{
plugins: { react },
rules: {
"react/jsx-props-no-multi-spaces": "error",
},
},
];<App spacy /><App too spacy /><App
prop1='abc'
prop2='def' /><App cozy /><App very cozy /><App
prop1='abc'
prop2='def' />Examples from the ESLint documentation.
react/jsx-props-no-multi-spaces
eslint-plugin-react
import react from "eslint-plugin-react";
export default [
{
plugins: { react },
rules: {
"react/jsx-props-no-multi-spaces": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce whitespace in and around the JSX opening and closing brackets
Enforce maximum of props on a single line in JSX
Disallow missing parentheses around multiline JSX
Disallow when this.state is accessed within setState