Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 659 Bytes

no-negation-in-equality-check.md

File metadata and controls

30 lines (20 loc) · 659 Bytes

Disallow negated expression in equality check

💼 This rule is enabled in the ✅ recommended config.

💡 This rule is manually fixable by editor suggestions.

Using a negated expression in equality check is most likely a mistake.

Fail

if (!foo === bar) {}
if (!foo !== bar) {}

Pass

if (foo !== bar) {}
if (!(foo === bar)) {}