Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

correctness.ui

Remove duplicate JSX attributes

Repeating the same prop on a JSX element makes the last value win silently and hides author intent.

#Metadata

Rule ID
ts.react.no-duplicate-jsx-attributes
Severity
medium
Confidence
0.9
Languages
javascript, typescript
Presets
recommended, strict
Stability
experimental
Applies to
function
Tags
react, rules-catalog, ui

#Why it matters

Duplicate attributes are usually copy-paste mistakes that change runtime behavior without type errors.

#Remediation

Remove the duplicate attribute or merge the values into a single prop expression.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/typescript/ts.react.no-duplicate-jsx-attributes.rule.yaml.