Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 321 Bytes

no-inverted-boolean-check.md

File metadata and controls

17 lines (11 loc) · 321 Bytes

no-inverted-boolean-check

🔧 fixable

It is needlessly complex to invert the result of a boolean comparison. The opposite comparison should be made instead.

Noncompliant Code Example

if (!(a === 2)) { ... }  // Noncompliant

Compliant Solution

if (a !== 2) { ... }