Enforces consistent style for element existence checks with indexOf(), lastIndexOf(), findIndex(), and findLastIndex().
Prefer using index === -1 to check if an element does not exist and index !== -1 to check if an element does exist.
These methods return -1 when an element is not found, so checking against -1 is more explicit and precise than using broad comparisons like < 0 or >= 0.
If your codebase has an established convention using < 0 or >= 0 for index checks, you may disable this rule.
Some developers find the comparison style more readable in certain contexts.