React Structural Complexity
Measures component structural complexity: JSX nesting depth, conditional rendering branches, early returns, prop spreading.
Component structural complexity — distinct from cyclomatic complexity — captures how hard the JSX tree is to read. Deeply nested conditionals inside JSX, multiple early returns with different shapes, and prop spreading that obscures what is actually rendered all add to this score.
Severity guide
- info
- A signal worth being aware of but not requiring action.
- warning
- A pattern likely to cause subtle bugs or performance issues; refactor recommended.
- critical
- A pattern actively breaking expected behavior or contracts; fix immediately.
Remediation
Address the flagged pattern; the message field describes the specific instance.
Review the issue location and apply the React/Next.js best practice for the pattern. Each emission carries enough context to act on directly.