---
source: crates/oxc_linter/src/tester.rs
---
  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:17]
 1 │ for (var i = 0; i < 10; i--){}
   ·                 ───┬──  ─┬─
   ·                    │     ╰── with this update
   ·                    ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:17]
 1 │ for (var i = 0; i <= 10; i--){}
   ·                 ───┬───  ─┬─
   ·                    │      ╰── with this update
   ·                    ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:17]
 1 │ for(var i = 10; i > 10; i++){}
   ·                 ───┬──  ─┬─
   ·                    │     ╰── with this update
   ·                    ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:17]
 1 │ for(var i = 10; i >= 0; i++){}
   ·                 ───┬──  ─┬─
   ·                    │     ╰── with this update
   ·                    ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:16]
 1 │ for(var i = 0; 10 > i; i--){}
   ·                ───┬──  ─┬─
   ·                   │     ╰── with this update
   ·                   ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:16]
 1 │ for(var i = 0; 10 >= i; i--){}
   ·                ───┬───  ─┬─
   ·                   │      ╰── with this update
   ·                   ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:17]
 1 │ for(var i = 10; 10 < i; i++){}
   ·                 ───┬──  ─┬─
   ·                    │     ╰── with this update
   ·                    ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:17]
 1 │ for(var i = 10; 0 <= i; i++){}
   ·                 ───┬──  ─┬─
   ·                    │     ╰── with this update
   ·                    ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:16]
 1 │ for(var i = 0; i < 10; i-=1){}
   ·                ───┬──  ──┬─
   ·                   │      ╰── with this update
   ·                   ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:16]
 1 │ for(var i = 0; i <= 10; i-=1){}
   ·                ───┬───  ──┬─
   ·                   │       ╰── with this update
   ·                   ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:17]
 1 │ for(var i = 10; i > 10; i+=1){}
   ·                 ───┬──  ──┬─
   ·                    │      ╰── with this update
   ·                    ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:17]
 1 │ for(var i = 10; i >= 0; i+=1){}
   ·                 ───┬──  ──┬─
   ·                    │      ╰── with this update
   ·                    ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:16]
 1 │ for(var i = 0; i < 10; i+=-1){}
   ·                ───┬──  ──┬──
   ·                   │      ╰── with this update
   ·                   ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:16]
 1 │ for(var i = 0; i <= 10; i+=-1){}
   ·                ───┬───  ──┬──
   ·                   │       ╰── with this update
   ·                   ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:17]
 1 │ for(var i = 10; i > 10; i-=-1){}
   ·                 ───┬──  ──┬──
   ·                    │      ╰── with this update
   ·                    ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:17]
 1 │ for(var i = 10; i >= 0; i-=-1){}
   ·                 ───┬──  ──┬──
   ·                    │      ╰── with this update
   ·                    ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop

  ⚠ eslint(for-direction): The update clause in this loop moves the variable in the wrong direction
   ╭─[for_direction.tsx:1:16]
 1 │ for(var i = 0; 10 > i; i-=1){}
   ·                ───┬──  ──┬─
   ·                   │      ╰── with this update
   ·                   ╰── This test moves in the wrong direction
   ╰────
  help: Use while loop for intended infinite loop
