Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Latest commit

 

History

History
15 lines (10 loc) · 301 Bytes

no-inverted-boolean-check.md

File metadata and controls

15 lines (10 loc) · 301 Bytes

no-inverted-boolean-check

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) { ... }