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