react/jsx-no-duplicate-props
eslint-plugin-react
No autofixRecommended
eslint.config.js
import react from "eslint-plugin-react";
export default [
{
plugins: { react },
rules: {
"react/jsx-no-duplicate-props": "error",
},
},
];<Hello name="John" name="John" />;<Hello firstname="John" lastname="Doe" />;Examples from the ESLint documentation.
react/jsx-no-duplicate-props
eslint-plugin-react
import react from "eslint-plugin-react";
export default [
{
plugins: { react },
rules: {
"react/jsx-no-duplicate-props": "error",
},
},
];react/jsx-no-duplicate-props
react plugin · correctness
{
"plugins": [
"react"
],
"rules": {
"react/jsx-no-duplicate-props": "error"
}
}suspicious/noDuplicateJsxProps
suspicious · since 1.0.0
{
"linter": {
"rules": {
"suspicious": {
"noDuplicateJsxProps": "error"
}
}
}
}Disallow comments from being inserted as text nodes
Disallow when a DOM element is using both children and dangerouslySetInnerHTML
Disallow passing of children as props
Disallow usage of the return value of ReactDOM.render
Disallow missing key props in iterators/collection literals