no-nested-ternary
UnreleasedConfiguration
rslint.config.ts
Rule Details
Improved version of the core ESLint no-nested-ternary rule. It allows cases where the nested ternary is only one level and wrapped in parentheses.
Unparenthesized or deeply nested ternaries force readers to track multiple conditions and branches at once, so this rule permits only clearly parenthesized single-level nesting.
Examples of incorrect code for this rule:
Examples of correct code for this rule: