menu
no-self-compare
Disallow comparisons with identical deterministic operands
Repeating the same deterministic operand on both sides usually indicates that one of the intended values was duplicated.
Instead, you SHOULD compare the two intended values or call .isNaN() when testing floating-point NaN.
Reported
1function changed(value: int32): boolean {2 return value !== value;3}Accepted
1function changed(left: int32, right: int32): boolean {2 return left !== right;3}