Rules
jsx-no-duplicate-props
Disallows duplicate props in JSX elements.
Full Name in eslint-plugin-react-x
react-x/jsx-no-duplicate-propsFull Name in @eslint-react/eslint-plugin
@eslint-react/jsx-no-duplicate-propsPresets
x
recommended
strict
Rule Details
Passing the same prop twice in a JSX element will cause the second value to overwrite the first. This is usually a mistake and can lead to unexpected behavior.
Common Violations
Invalid
<Hello name="John" name="Doe" />;Valid
<Hello name="John" />;Resources
Further Reading
See Also
react-x/jsx-uses-reactMarks React variables as used when JSX is present.react-x/jsx-uses-varsMarks JSX element variables as used.