Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 744 Bytes

File metadata and controls

34 lines (24 loc) · 744 Bytes

no-negation-in-equality-check

📝 Disallow negated expression in equality check.

💼 This rule is enabled in the following configs: ✅ recommended, ☑️ unopinionated.

💡 This rule is manually fixable by editor suggestions.

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

Examples

// ❌
if (!foo === bar) {}
// ❌
if (!foo !== bar) {}
// ✅
if (foo !== bar) {}
// ✅
if (!(foo === bar)) {}