jsx-max-depth
Configuration
rslint.config.ts
Enforce JSX maximum depth.
Rule Details
This rule validates a specific depth for JSX elements.
Examples of incorrect code for this rule:
Rule Options
It takes one option object with a positive max integer (default: 2).
Examples of incorrect code for this rule with { "max": 1 }:
Examples of incorrect code for this rule with { "max": 2 }:
Examples of correct code for this rule with { "max": 1 }:
Examples of correct code for this rule with { "max": 2 }:
Examples of correct code for this rule with { "max": 3 }:
When Not To Use It
If you are not using JSX then you can disable this rule.