no-confusing-non-null-assertion
Configuration
rslint.config.ts
Rule Details
Disallow non-null assertion in locations that may be confusing.
A non-null assertion (!) placed immediately before =, ==, ===, in, or instanceof is visually almost indistinguishable from the operators !=, !==, !(... in ...), or !(... instanceof ...). This rule flags those combinations and offers suggestions to either remove the assertion or wrap the left-hand side in parentheses to disambiguate.
Examples of incorrect code for this rule:
Examples of correct code for this rule: