avoid_bool_literals_in_conditional_expressions

Group: style

Maturity: stable

Linter v0.1.46

Since info is static, may be stale

View all Lint Rules

Using the Linter

AVOID bool literals in conditional expressions.

BAD:

condition ? true : boolExpression
condition ? false : boolExpression
condition ? boolExpression : true
condition ? boolExpression : false

GOOD:

condition || boolExpression
!condition && boolExpression
!condition || boolExpression
condition && boolExpression