menu

no-negated-condition

Prefer positive conditions when both branches are present

A negated condition assigns the positive case to the second of two explicit branches. Instead, you SHOULD remove the negation and exchange the branches.

Reported

1function status(isReady: boolean): string {2    return !isReady ? "waiting" : "ready";3}

Accepted

1function status(isReady: boolean): string {2    return isReady ? "ready" : "waiting";3}