react/jsx-equals-spacing
eslint-plugin-react
Safe autofix
eslint.config.js
import react from "eslint-plugin-react";
export default [
{
plugins: { react },
rules: {
"react/jsx-equals-spacing": "error",
},
},
];<Hello name = {firstname} />;
<Hello name ={firstname} />;
<Hello name= {firstname} />;<Hello name={firstname} />;
<Hello name ={firstname} />;
<Hello name= {firstname} />;<Hello name={firstname} />;
<Hello name />;
<Hello {...props} />;<Hello name = {firstname} />;
<Hello name />;
<Hello {...props} />;Examples from the ESLint documentation.
react/jsx-equals-spacing
eslint-plugin-react
import react from "eslint-plugin-react";
export default [
{
plugins: { react },
rules: {
"react/jsx-equals-spacing": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
Enforce proper position of the first property in JSX
Enforce consistent linebreaks in curly braces in JSX attributes and expressions
Enforce closing tag location for multiline JSX