--- source: crates/biome_js_analyze/tests/spec_tests.rs expression: invalid.jsonc --- # Input ```cjs for (; true;); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ for (; true;); │ ^^^^ ``` # Input ```cjs for (; ``;); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ for (; ``;); │ ^^ ``` # Input ```cjs for (; `foo`;); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ for (; `foo`;); │ ^^^^^ ``` # Input ```cjs for (; `foo${bar}`;); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ for (; `foo${bar}`;); │ ^^^^^^^^^^^ ``` # Input ```cjs do { } while (1) ``` # Diagnostics ``` invalid.jsonc:1:15 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ do { } while (1) │ ^ ``` # Input ```cjs do { } while ('1') ``` # Diagnostics ``` invalid.jsonc:1:15 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ do { } while ('1') │ ^^^ ``` # Input ```cjs do { } while (0) ``` # Diagnostics ``` invalid.jsonc:1:15 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ do { } while (0) │ ^ ``` # Input ```cjs do { } while (t = -2) ``` # Diagnostics ``` invalid.jsonc:1:15 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ do { } while (t = -2) │ ^^^^^^ ``` # Input ```cjs do { } while (``) ``` # Diagnostics ``` invalid.jsonc:1:15 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ do { } while (``) │ ^^ ``` # Input ```cjs do { } while (`foo`) ``` # Diagnostics ``` invalid.jsonc:1:15 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ do { } while (`foo`) │ ^^^^^ ``` # Input ```cjs do { } while (`foo${bar}`) ``` # Diagnostics ``` invalid.jsonc:1:15 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ do { } while (`foo${bar}`) │ ^^^^^^^^^^^ ``` # Input ```cjs true ? 1 : 2; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ true ? 1 : 2; │ ^^^^ ``` # Input ```cjs 1 ? 1 : 2; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ 1 ? 1 : 2; │ ^ ``` # Input ```cjs q = 0 ? 1 : 2; ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ q = 0 ? 1 : 2; │ ^ ``` # Input ```cjs (q = 0) ? 1 : 2; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ (q = 0) ? 1 : 2; │ ^^^^^^^ ``` # Input ```cjs `` ? 1 : 2; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ `` ? 1 : 2; │ ^^ ``` # Input ```cjs `foo` ? 1 : 2; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ `foo` ? 1 : 2; │ ^^^^^ ``` # Input ```cjs `foo${bar}` ? 1 : 2; ``` # Diagnostics ``` invalid.jsonc:1:1 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ `foo${bar}` ? 1 : 2; │ ^^^^^^^^^^^ ``` # Input ```cjs if (-2); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (-2); │ ^^ ``` # Input ```cjs if (true); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (true); │ ^^^^ ``` # Input ```cjs if (1); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (1); │ ^ ``` # Input ```cjs if ({}); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ({}); │ ^^ ``` # Input ```cjs if (0 < 1); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (0 < 1); │ ^^^^^ ``` # Input ```cjs if (0 || 1); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (0 || 1); │ ^^^^^^ ``` # Input ```cjs if (a, 1); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a, 1); │ ^^^^ ``` # Input ```cjs if (`foo`); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (`foo`); │ ^^^^^ ``` # Input ```cjs if (``); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (``); │ ^^ ``` # Input ```cjs if (`\ `); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (`\ │ ^^ > 2 │ `); │ ^ ``` # Input ```cjs if (`${'bar'}`); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (`${'bar'}`); │ ^^^^^^^^^^ ``` # Input ```cjs if (`${'bar' + `foo`}`); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (`${'bar' + `foo`}`); │ ^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (`foo${false || true}`); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (`foo${false || true}`); │ ^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (`foo${0 || 1}`); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (`foo${0 || 1}`); │ ^^^^^^^^^^^^^^ ``` # Input ```cjs if (`foo${bar}`); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (`foo${bar}`); │ ^^^^^^^^^^^ ``` # Input ```cjs if (`${bar}foo`); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (`${bar}foo`); │ ^^^^^^^^^^^ ``` # Input ```cjs if (!(true || a)); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (!(true || a)); │ ^^^^^^^^^^^^ ``` # Input ```cjs if (!(a && void b && c)); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (!(a && void b && c)); │ ^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (0 || !(a && null)); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (0 || !(a && null)); │ ^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (1 + !(a || true)); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (1 + !(a || true)); │ ^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (!(null && a) > 1); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (!(null && a) > 1); │ ^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (+(!(a && 0))); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (+(!(a && 0))); │ ^^^^^^^^^^^^ ``` # Input ```cjs if (!typeof a === 'string'); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (!typeof a === 'string'); │ ^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (-('foo' || a)); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (-('foo' || a)); │ ^^^^^^^^^^^^^ ``` # Input ```cjs if (+(void a && b) === ~(1 || c)); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (+(void a && b) === ~(1 || c)); │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (a ||= true); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a ||= true); │ ^^^^^^^^^^ ``` # Input ```cjs if (a ||= 5); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a ||= 5); │ ^^^^^^^ ``` # Input ```cjs if (a ||= 'foo' || b); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a ||= 'foo' || b); │ ^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (a ||= b || /regex/); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a ||= b || /regex/); │ ^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (a ||= b ||= true); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a ||= b ||= true); │ ^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (a ||= b ||= c || 1); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a ||= b ||= c || 1); │ ^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (!(a ||= true)); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (!(a ||= true)); │ ^^^^^^^^^^^^^ ``` # Input ```cjs if (!(a ||= 'foo') === true); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (!(a ||= 'foo') === true); │ ^^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (!(a ||= 'foo') === false); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (!(a ||= 'foo') === false); │ ^^^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (a || (b ||= true)); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a || (b ||= true)); │ ^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if ((a ||= 1) || b); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ((a ||= 1) || b); │ ^^^^^^^^^^^^^^ ``` # Input ```cjs if ((a ||= true) && true); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ((a ||= true) && true); │ ^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (true && (a ||= true)); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (true && (a ||= true)); │ ^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (a &&= false); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a &&= false); │ ^^^^^^^^^^^ ``` # Input ```cjs if (a &&= null); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a &&= null); │ ^^^^^^^^^^ ``` # Input ```cjs if (a &&= void b); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a &&= void b); │ ^^^^^^^^^^^^ ``` # Input ```cjs if (a &&= 0 && b); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a &&= 0 && b); │ ^^^^^^^^^^^^ ``` # Input ```cjs if (a &&= b && ''); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a &&= b && ''); │ ^^^^^^^^^^^^^ ``` # Input ```cjs if (a &&= b &&= false); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a &&= b &&= false); │ ^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (a &&= b &&= c && false); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a &&= b &&= c && false); │ ^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (!(a &&= false)); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (!(a &&= false)); │ ^^^^^^^^^^^^^^ ``` # Input ```cjs if (!(a &&= 0) + 1); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (!(a &&= 0) + 1); │ ^^^^^^^^^^^^^^ ``` # Input ```cjs if (a && (b &&= false)); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a && (b &&= false)); │ ^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if ((a &&= null) && b); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ((a &&= null) && b); │ ^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (false || (a &&= false)); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (false || (a &&= false)); │ ^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if ((a &&= false) || false); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ((a &&= false) || false); │ ^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs while ([]); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ while ([]); │ ^^ ``` # Input ```cjs while (~!0); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ while (~!0); │ ^^^ ``` # Input ```cjs while (x = 1); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ while (x = 1); │ ^^^^^ ``` # Input ```cjs while (function () { }); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ while (function () { }); │ ^^^^^^^^^^^^^^^ ``` # Input ```cjs while (1); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ while (1); │ ^ ``` # Input ```cjs while (() => { }); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ while (() => { }); │ ^^^^^^^^^ ``` # Input ```cjs while (`foo`); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ while (`foo`); │ ^^^^^ ``` # Input ```cjs while (``); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ while (``); │ ^^ ``` # Input ```cjs while (`${'foo'}`); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ while (`${'foo'}`); │ ^^^^^^^^^^ ``` # Input ```cjs while (`${'foo' + 'bar'}`); ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ while (`${'foo' + 'bar'}`); │ ^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (typeof x) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (typeof x) { } │ ^^^^^^^^ ``` # Input ```cjs if (typeof 'abc' === 'string') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (typeof 'abc' === 'string') { } │ ^^^^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (a = typeof b) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a = typeof b) { } │ ^^^^^^^^^^^^ ``` # Input ```cjs if (a, typeof b) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a, typeof b) { } │ ^^^^^^^^^^^ ``` # Input ```cjs if (typeof 'a' == 'string' || typeof 'b' == 'string') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (typeof 'a' == 'string' || typeof 'b' == 'string') { } │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs while (typeof x) { } ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ while (typeof x) { } │ ^^^^^^^^ ``` # Input ```cjs if (1 || void x); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (1 || void x); │ ^^^^^^^^^^^ ``` # Input ```cjs if (void x); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (void x); │ ^^^^^^ ``` # Input ```cjs if (y = void x); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (y = void x); │ ^^^^^^^^^^ ``` # Input ```cjs if (x, void x); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (x, void x); │ ^^^^^^^^^ ``` # Input ```cjs if (void x === void y); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (void x === void y); │ ^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (void x && a); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (void x && a); │ ^^^^^^^^^^^ ``` # Input ```cjs if (a && void x); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a && void x); │ ^^^^^^^^^^^ ``` # Input ```cjs if (false && abc === 'str') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (false && abc === 'str') { } │ ^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (true || abc === 'str') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (true || abc === 'str') { } │ ^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (1 || abc === 'str') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (1 || abc === 'str') { } │ ^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (abc === 'str' || true) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (abc === 'str' || true) { } │ ^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (abc === 'str' || true || def === 'str') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (abc === 'str' || true || def === 'str') { } │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (false || true) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (false || true) { } │ ^^^^^^^^^^^^^ ``` # Input ```cjs if (typeof abc === 'str' || true) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (typeof abc === 'str' || true) { } │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if ('str' || a) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ('str' || a) { } │ ^^^^^^^^^^ ``` # Input ```cjs if ('str' || abc === 'str') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ('str' || abc === 'str') { } │ ^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if ('str1' || 'str2') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ('str1' || 'str2') { } │ ^^^^^^^^^^^^^^^^ ``` # Input ```cjs if ('str1' && 'str2') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ('str1' && 'str2') { } │ ^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (abc === 'str' || 'str') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (abc === 'str' || 'str') { } │ ^^^^^^^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (a || 'str') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (a || 'str') { } │ ^^^^^^^^^^ ``` # Input ```cjs function* foo() { while (1) { } yield 'foo'; } ``` # Diagnostics ``` invalid.jsonc:1:26 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ function* foo() { while (1) { } yield 'foo'; } │ ^ ``` # Input ```cjs function* foo() { while (1) { if (true) { yield 'foo'; } } } ``` # Diagnostics ``` invalid.jsonc:1:26 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ function* foo() { while (1) { if (true) { yield 'foo'; } } } │ ^ ``` ``` invalid.jsonc:1:35 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ function* foo() { while (1) { if (true) { yield 'foo'; } } } │ ^^^^ ``` # Input ```cjs function* foo() { while (1) { yield 'foo'; } while (1) { } } ``` # Diagnostics ``` invalid.jsonc:1:53 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ function* foo() { while (1) { yield 'foo'; } while (1) { } } │ ^ ``` # Input ```cjs var a = function* foo() { while (1) { } yield 'foo'; } ``` # Diagnostics ``` invalid.jsonc:1:34 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ var a = function* foo() { while (1) { } yield 'foo'; } │ ^ ``` # Input ```cjs while (1) { function* foo() { yield; } } ``` # Diagnostics ``` invalid.jsonc:1:8 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ while (1) { function* foo() { yield; } } │ ^ ``` # Input ```cjs function* foo() { if (true) { yield 'foo'; } } ``` # Diagnostics ``` invalid.jsonc:1:23 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ function* foo() { if (true) { yield 'foo'; } } │ ^^^^ ``` # Input ```cjs function* foo() { for (let foo = yield; true;) { } } ``` # Diagnostics ``` invalid.jsonc:1:41 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ function* foo() { for (let foo = yield; true;) { } } │ ^^^^ ``` # Input ```cjs function* foo() { for (foo = yield; true;) { } } ``` # Diagnostics ``` invalid.jsonc:1:37 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ function* foo() { for (foo = yield; true;) { } } │ ^^^^ ``` # Input ```cjs function foo() { while (1) { function* bar() { while (1) { yield; } } } } ``` # Diagnostics ``` invalid.jsonc:1:25 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ function foo() { while (1) { function* bar() { while (1) { yield; } } } } │ ^ ``` # Input ```cjs function foo() { while (1) { const bar = function* () { while (1) { yield; } } } } ``` # Diagnostics ``` invalid.jsonc:1:25 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ function foo() { while (1) { const bar = function* () { while (1) { yield; } } } } │ ^ ``` # Input ```cjs function* foo() { for (let foo = 1 + 2 + 3 + (yield); true; baz) { } } ``` # Diagnostics ``` invalid.jsonc:1:55 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ function* foo() { for (let foo = 1 + 2 + 3 + (yield); true; baz) { } } │ ^^^^ ``` # Input ```cjs if ([a]) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ([a]) { } │ ^^^ ``` # Input ```cjs if ([]) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ([]) { } │ ^^ ``` # Input ```cjs if ('' + ['a']) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ('' + ['a']) { } │ ^^^^^^^^^^ ``` # Input ```cjs if ('' + []) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ('' + []) { } │ ^^^^^^^ ``` # Input ```cjs if (+1) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (+1) { } │ ^^ ``` # Input ```cjs if ([,] + '') { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if ([,] + '') { } │ ^^^^^^^^ ``` # Input ```cjs if (/foo/ui); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (/foo/ui); │ ^^^^^^^ ``` # Input ```cjs if (0n); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (0n); │ ^^ ``` # Input ```cjs if (0b0n); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (0b0n); │ ^^^^ ``` # Input ```cjs if (0o0n); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (0o0n); │ ^^^^ ``` # Input ```cjs if (0x0n); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (0x0n); │ ^^^^ ``` # Input ```cjs if (0b1n); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (0b1n); │ ^^^^ ``` # Input ```cjs if (0o1n); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (0o1n); │ ^^^^ ``` # Input ```cjs if (0x1n); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (0x1n); │ ^^^^ ``` # Input ```cjs if (0x1n || foo); ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (0x1n || foo); │ ^^^^^^^^^^^ ``` # Input ```cjs if (class { }) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (class { }) { } │ ^^^^^^^^^ ``` # Input ```cjs if (new Foo()) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (new Foo()) { } │ ^^^^^^^^^ ``` # Input ```cjs if (new Boolean(foo)) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (new Boolean(foo)) { } │ ^^^^^^^^^^^^^^^^ ``` # Input ```cjs if (new String(foo)) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (new String(foo)) { } │ ^^^^^^^^^^^^^^^ ``` # Input ```cjs if (new Number(foo)) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (new Number(foo)) { } │ ^^^^^^^^^^^^^^^ ``` # Input ```cjs if (`${[...['a']]}`) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (`${[...['a']]}`) { } │ ^^^^^^^^^^^^^^^ ``` # Input ```cjs if (undefined) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (undefined) { } │ ^^^^^^^^^ ``` # Input ```cjs if (Boolean(1)) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (Boolean(1)) { } │ ^^^^^^^^^^ ``` # Input ```cjs if (Boolean()) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (Boolean()) { } │ ^^^^^^^^^ ``` # Input ```cjs if (Boolean([a])) { } ``` # Diagnostics ``` invalid.jsonc:1:5 lint/correctness/noConstantCondition ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Unexpected constant condition. > 1 │ if (Boolean([a])) { } │ ^^^^^^^^^^^^ ```