prefer-correct-for-loop-increment
preset: recommended
Warns when a for loop increments a wrong variable.
Example
❌ Bad:
void main() {
var j = 1;
for (var i = 0; i < 10; j++) {} // LINT
}
✅ Good:
void main() {
var j = 1;
for (var i = 0; i < 10; i++) {}
for (var j = 0; j < 10; j++) {}
for (var i = 0; j < 10; j++) {}
}