no-unmodified-loop-condition
Configuration
rslint.config.ts
Rule Details
Disallows variables in loop conditions that are not modified inside the loop body. If a variable used in a loop's test condition is never assigned to, incremented, or decremented within the loop, it is likely a bug that leads to an infinite loop or incorrect termination.
Conditions that contain function calls, member access expressions, new expressions, or tagged template expressions are skipped, since those may have side effects that modify the condition indirectly.
Examples of incorrect code for this rule:
Examples of correct code for this rule: