Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

maintainability.ui

Avoid spreading props onto JSX elements

Unfiltered prop spreads hide which attributes reach the DOM and defeat static analysis of event handlers and accessibility props.

#Metadata

Rule ID
ts.react.no-jsx-props-spread
Severity
low
Confidence
0.75
Languages
javascript, typescript
Presets
recommended, strict
Stability
experimental
Applies to
function
Tags
performance, react, rules-catalog, ui

#Why it matters

Explicit prop forwarding documents the component contract and avoids accidentally passing invalid or sensitive attributes downstream.

#Remediation

Destructure the props you intend to pass, whitelist safe attributes, or use a typed wrapper component.

#Repository path

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