for-direction
Configuration
rslint.config.ts
Rule Details
Enforces that the update clause in a for loop moves the counter variable in the correct direction relative to the loop's stop condition. A for loop with a counter that moves in the wrong direction will run infinitely.
Examples of incorrect code for this rule:
Examples of correct code for this rule: