---
source: crates/oxc_linter/src/tester.rs
---
  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:14]
 1 │ var x; if (x = 0) { var b = 1; }
   ·              ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:17]
 1 │ var x; while (x = 0) { var b = 1; }
   ·                 ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:38]
 1 │ var x = 0, y; do { y = x; } while (x = x + 1);
   ·                                      ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:15]
 1 │ var x; for(; x+=1 ;){};
   ·               ──
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:16]
 1 │ var x; if ((x) = (0));
   ·                ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:27]
 1 │ if (someNode || (someNode = parentNode)) { }
   ·                           ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:30]
 1 │ while (someNode || (someNode = parentNode)) { }
   ·                              ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:37]
 1 │ do { } while (someNode || (someNode = parentNode));
   ·                                     ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:39]
 1 │ for (; (typeof l === 'undefined' ? (l = 0) : l); i++) { }
   ·                                       ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:39]
 1 │ for (; (typeof l === 'undefined' ? (l = 0) : l); i++) { }
   ·                                       ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:7]
 1 │ if (x = 0) { }
   ·       ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:7]
 1 │ if (x = 0) { }
   ·       ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:10]
 1 │ while (x = 0) { }
   ·          ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:10]
 1 │ while (x = 0) { }
   ·          ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:17]
 1 │ do { } while (x = x + 1);
   ·                 ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:17]
 1 │ do { } while (x = x + 1);
   ·                 ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:9]
 1 │ for(; x = y; ) { }
   ·         ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:9]
 1 │ for(; x = y; ) { }
   ·         ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:8]
 1 │ if ((x = 0)) { }
   ·        ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:8]
 1 │ if ((x = 0)) { }
   ·        ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:11]
 1 │ while ((x = 0)) { }
   ·           ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:11]
 1 │ while ((x = 0)) { }
   ·           ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:18]
 1 │ do { } while ((x = x + 1));
   ·                  ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:18]
 1 │ do { } while ((x = x + 1));
   ·                  ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:10]
 1 │ for(; (x = y); ) { }
   ·          ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:10]
 1 │ for(; (x = y); ) { }
   ·          ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:19]
 1 │ var x; var b = (x = 0) ? 1 : 0;
   ·                   ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:24]
 1 │ var x; var b = x && (y = 0) ? 1 : 0;
   ·                        ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses

  ⚠ eslint(no-cond-assign): Expected a conditional expression and instead saw an assignment
   ╭─[no_cond_assign.tsx:1:23]
 1 │ (((3496.29)).bkufyydt = 2e308) ? foo : bar;
   ·                       ─
   ╰────
  help: Consider wrapping the assignment in additional parentheses
