react/jsx-first-prop-new-line
eslint-plugin-react
Safe autofix
eslint.config.js
import react from "eslint-plugin-react";
export default [
{
plugins: { react },
rules: {
"react/jsx-first-prop-new-line": "error",
},
},
];<Hello personal={true} />
<Hello personal={true}
foo="bar"
/><Hello
personal />
<Hello
personal
/><Hello personal
prop /><Hello
personal />
<Hello
personal
/><Hello personal={true} />
<Hello personal={true}
foo="bar"
/><Hello personal={true} />
<Hello
personal={true}
foo="bar"
/>Examples from the ESLint documentation.
react/jsx-first-prop-new-line
eslint-plugin-react
import react from "eslint-plugin-react";
export default [
{
plugins: { react },
rules: {
"react/jsx-first-prop-new-line": "error",
},
},
];Oxlint does not have this rule.
Biome does not have this rule.
Enforce or disallow spaces around equal signs in JSX attributes
Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
Enforce consistent linebreaks in curly braces in JSX attributes and expressions
Enforce maximum of props on a single line in JSX