no-self-compare
Configuration
rslint.config.ts
Rule Details
Disallows comparing a value to itself using any of the equality or relational operators (===, ==, !==, !=, >, <, >=, <=). Such a comparison is typically a typo (the programmer likely meant a different operand) and is either always true, always false, or always NaN-sensitive, so the check is pointless.
Examples of incorrect code for this rule:
Examples of correct code for this rule: