Pattern: Negation on left side of equality check
Issue: -
Putting a negation operator on the left side of an equality check is likely a mistake from trying to negate the entire condition. Use the appropriate comparison operator or negate the entire expression instead.
Example of incorrect code:
if (!foo === bar) {}
if (!foo !== bar) {}
Example of correct code:
if (foo !== bar) {}
if (!(foo === bar)) {}