fixhunt

repo

Scans / 2026-10-23T03-53-12-014Z-scan-biome/home/sun/dev/diaghunt/demo/repocd web && node --testbiome 2.5.152026-10-23 03:53 UTC6 rules tried, 5 changed files, 4 changed the outcome, 1 did notmodel cost $0.03

One command was observed. Code it does not exercise is not observed; "no difference" means the normalized output and exit status matched, not that the fix is correct.

12 enabled rule(s) already have a finding in the bank (7 more known-risk rules of biome are not enabled here)
rulelabelfindingsjudgeupstream
complexity/noUselessUndefinedInitializationlabelled safe3 0 re-verifiedreal · highduplicate biomejs/biome/issues/11938 related biomejs/biome/issues/6003 +5
style/noUselessElselabelled safe3 0 re-verifiedreal · highduplicate biomejs/biome/issues/11937 related biomejs/biome/issues/3770 +6
complexity/noUselessLoneBlockStatementslabelled safe1 0 re-verifiedreal · highrelated biomejs/biome/issues/11935 related biomejs/biome/issues/834 +2
complexity/noUselessThisAliaslabelled safe1 0 re-verifiedreal · highrelated biomejs/biome/issues/1633
complexity/useRegexLiteralslabelled safe1 0 re-verifiedreal · highrelated biomejs/biome/issues/11939 related biomejs/biome/issues/1704 +1
style/noNegationElselabelled safe1 0 re-verifiedreal · highrelated biomejs/biome/issues/9629 related biomejs/biome/issues/7518 +1
style/useExponentiationOperatorlabelled safe1 0 re-verifiedreal · highrelated biomejs/biome/issues/410
style/useNumberNamespacelabelled safe5 0 re-verifiedreal · mediumrelated biomejs/biome/issues/1228 related biomejs/biome/issues/3578 +1
suspicious/noPrototypeBuiltinslabelled safe7 0 re-verifiedintended-change · highrelated biomejs/biome/issues/10769 related biomejs/biome/issues/7900 +2
complexity/noAdjacentSpacesInRegexlabelled safe2 0 re-verifiedintrospection-only · lowduplicate biomejs/biome/issues/11419 related biomejs/biome/issues/6670 +1
nursery/useVueBaseImportlabelled safe9 0 re-verifiedprogram-bug · lowrelated biomejs/biome/pull/7597 related biomejs/biome/pull/3274 +6
complexity/useFlatMaplabelled safe1 0 re-verifiedprogram-bug · lowrelated biomejs/biome/issues/1768 related biomejs/biome/issues/2817 +2

style/noNegationElsefix breaks the build

fix-breaks-build labelled safe exit 0 → exit 1 real · high
files changed
1: web/src/negate.js
reduced to
1 of 1 hunk(s) in web/src/negate.js, 1 run(s); the patch was applied with git apply and reproduced the same difference
sites reported
1 → 0 in 1 linted file(s)

Change (reduced)

--- a/web/src/negate.js
+++ b/web/src/negate.js
@@ -1,4 +1,3 @@
 export function pick(ok, a, b) {
-  if (!ok) return a
-  else return b
+  if (ok) return b else return a
 }

Observed

stdout lines only before the fix:
  # Subtest: pick
  ok 3 - pick
  # pass 5
  # fail 0
stdout lines only after the fix:
  # file:///w/web/src/negate.js:N
  #   if (ok) return b else return a
  #                    ^^^^
  # SyntaxError: Unexpected token 'else'
  #     at compileSourceTextModule (node:internal/modules/esm/utils:346:16)
  #     at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:146:18)
  #     at \#translate (node:internal/modules/esm/loader:497:12)
  #     at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:544:27)
  # Node.js v20.20.0
  # Subtest: /w/web/test/negate.test.js
  not ok 3 - /w/web/test/negate.test.js
    location: '/w/web/test/negate.test.js:N'
    failureType: 'testCodeFailure'
    exitCode: 1
    signal: ~
    error: 'test failed'
    code: 'ERR_TEST_FAILURE'
  # pass 4
  # fail 1
exit 0 → 1

Output after tail

failureType: 'testCodeFailure'
  exitCode: 1
  signal: ~
  error: 'test failed'
  code: 'ERR_TEST_FAILURE'
  ...
# Subtest: parseAll adds the converter's value
ok 4 - parseAll adds the converter's value
  ---
  duration_ms: 1.294294
  ...
# Subtest: util
ok 5 - util
  ---
  duration_ms: 1.280512
  ...
1..5
# tests 5
# suites 0
# pass 4
# fail 1
# cancelled 0
# skipped 0
# todo 0
# duration_ms 87.710965

Judge Nemotron 3 Ultra, advisory

The fix rewrites `if (!ok) return a; else return b;` to `if (ok) return b else return a`, which is invalid JavaScript syntax because an `else` clause cannot directly follow a single-statement `if` without braces. The original code parses and runs correctly, but the fixed code throws a SyntaxError at parse time, breaking the build.

Explanation Nemotron 3 Super, model draft

The rewrite changes control flow syntax incorrectly: `if (ok) return b else return a` lacks braces around the then-branch, causing JavaScript to parse `return b else return a` as invalid syntax due to unexpected `else`, breaking execution entirely whereas the original used valid guarded returns with explicit else block structure preserving semantics when syntactically correct. This is not a semantic preservation but a syntactic error introduction.

Upstream

Files

evidence sheetminimal.patch
full diff (10 lines)
diff -ruN -x .git -x node_modules -x .venv -x venv -x __pycache__ -x .pytest_cache -x .ruff_cache -x .mypy_cache -x dist -x build -x target -x .tox -x .nox -x runs base/web/src/negate.js rules/style_noNegationElse/web/src/negate.js
--- base/web/src/negate.js	2026-10-22 23:53:12.513778005 -0400
+++ rules/style_noNegationElse/web/src/negate.js	2026-10-22 23:53:15.073826160 -0400
@@ -1,4 +1,3 @@
 export function pick(ok, a, b) {
-  if (!ok) return a
-  else return b
+  if (ok) return b else return a
 }

complexity/noUselessLoneBlockStatementsfix changes program behavior

fix-changes-behavior labelled safe exit 0 → exit 1 real · high
files changed
1: web/src/block.js
reduced to
1 of 1 hunk(s) in web/src/block.js, 1 run(s); the patch was applied with git apply and reproduced the same difference
sites reported
1 → 0 in 1 linted file(s)

Change (reduced)

--- a/web/src/block.js
+++ b/web/src/block.js
@@ -1,8 +1,6 @@
 // Written without semicolons; the lone block keeps the next line from being read as an index expression.
 export function run(log) {
   const items = [1, 2]
-  {
     [0, 1].forEach((i) => log(items[i]))
-  }
   return log
 }

Observed

stdout lines only before the fix:
  ok 1 - run logs both items
  # pass 5
  # fail 0
stdout lines only after the fix:
  not ok 1 - run logs both items
    location: '/w/web/test/block.test.js:N'
    failureType: 'testCodeFailure'
    error: '[1,2][(0 , 1)].forEach is not a function'
    code: 'ERR_TEST_FAILURE'
    name: 'TypeError'
    stack: |-
      run (file:///w/web/src/block.js:N)
      TestContext.<anonymous> (file:///w/web/test/block.test.js:N)
      Test.runInAsyncScope (node:async_hooks:206:9)
      Test.run (node:internal/test_runner/test:796:25)
      Test.processPendingSubtests (node:internal/test_runner/test:526:18)
      node:internal/test_runner/harness:255:12
      node:internal/process/task_queues:140:7
      AsyncResource.runInAsyncScope (node:async_hooks:206:9)
      AsyncResource.runMicrotask (node:internal/process/task_queues:137:8)
  # pass 4
  # fail 1
exit 0 → 1

Output after tail

...
# Subtest: pick
ok 3 - pick
  ---
  duration_ms: 0.935234
  ...
# Subtest: parseAll adds the converter's value
ok 4 - parseAll adds the converter's value
  ---
  duration_ms: 1.243567
  ...
# Subtest: util
ok 5 - util
  ---
  duration_ms: 1.29201
  ...
1..5
# tests 5
# suites 0
# pass 4
# fail 1
# cancelled 0
# skipped 0
# todo 0
# duration_ms 85.518223

Judge Nemotron 3 Ultra, advisory

The rule removes a lone block that was intentionally placed to prevent the following line starting with '[' from being parsed as a computed member access on the preceding array literal. Without the block, '[0, 1].forEach(...)' becomes '[1, 2][0, 1].forEach(...)', which is a property access yielding undefined, causing a TypeError. The documentation claims such blocks are unnecessary, but in ASI-free code they serve as statement separators, so the rewrite is not semantics-preserving.

Explanation Nemotron 3 Super, model draft

Removing the braces turns `[0, 1]` into part of the preceding statement due to JavaScript’s ASI rules: `const items = [1, 2] [0, 1].forEach(...)` parses as accessing property `[0, 1]` on the array `[1, 2]`, which yields `undefined` instead of calling `.forEach`. Thus the loop never runs and the test fails. The original block prevented this misinterpretation by delimiting the statement. Removing it changes the program’s parse tree and runtime behavior, so the rewrite is not semantics‑preserving.

Upstream

Files

evidence sheetminimal.patch
full diff (13 lines)
diff -ruN -x .git -x node_modules -x .venv -x venv -x __pycache__ -x .pytest_cache -x .ruff_cache -x .mypy_cache -x dist -x build -x target -x .tox -x .nox -x runs base/web/src/block.js rules/complexity_noUselessLoneBlockStatements/web/src/block.js
--- base/web/src/block.js	2026-10-22 23:53:12.513778005 -0400
+++ rules/complexity_noUselessLoneBlockStatements/web/src/block.js	2026-10-22 23:53:15.071826122 -0400
@@ -1,8 +1,6 @@
 // Written without semicolons; the lone block keeps the next line from being read as an index expression.
 export function run(log) {
   const items = [1, 2]
-  {
     [0, 1].forEach((i) => log(items[i]))
-  }
   return log
 }

style/useNumberNamespacefix changes program behavior

fix-changes-behavior labelled safe exit 0 → exit 1 real · medium
files changed
1: web/src/parse.js
reduced to
1 of 1 hunk(s) in web/src/parse.js, 1 run(s); the patch was applied with git apply and reproduced the same difference
sites reported
1 → 0 in 1 linted file(s)

Change (reduced)

--- a/web/src/parse.js
+++ b/web/src/parse.js
@@ -1,4 +1,4 @@
 // Parse string values with a caller-supplied converter for the non-integer part.
 export function parseAll(values, Number) {
-  return values.map((v) => parseInt(v, 10) + Number(v));
+  return values.map((v) => Number.parseInt(v, 10) + Number(v));
 }

Observed

stdout lines only before the fix:
  ok 4 - parseAll adds the converter's value
  # pass 5
  # fail 0
stdout lines only after the fix:
  not ok 4 - parseAll adds the converter's value
    location: '/w/web/test/parse.test.js:N'
    failureType: 'testCodeFailure'
    error: 'Number.parseInt is not a function'
    code: 'ERR_TEST_FAILURE'
    name: 'TypeError'
    stack: |-
      file:///w/web/src/parse.js:N
      Array.map (<anonymous>)
      parseAll (file:///w/web/src/parse.js:N)
      TestContext.<anonymous> (file:///w/web/test/parse.test.js:N)
      Test.runInAsyncScope (node:async_hooks:206:9)
      Test.run (node:internal/test_runner/test:796:25)
      Test.processPendingSubtests (node:internal/test_runner/test:526:18)
      node:internal/test_runner/harness:255:12
      node:internal/process/task_queues:140:7
      AsyncResource.runInAsyncScope (node:async_hooks:206:9)
  # pass 4
  # fail 1
exit 0 → 1

Output after tail

file:///w/web/src/parse.js:3:35
    Array.map (<anonymous>)
    parseAll (file:///w/web/src/parse.js:3:17)
    TestContext.<anonymous> (file:///w/web/test/parse.test.js:6:20)
    Test.runInAsyncScope (node:async_hooks:206:9)
    Test.run (node:internal/test_runner/test:796:25)
    Test.processPendingSubtests (node:internal/test_runner/test:526:18)
    node:internal/test_runner/harness:255:12
    node:internal/process/task_queues:140:7
    AsyncResource.runInAsyncScope (node:async_hooks:206:9)
  ...
# Subtest: util
ok 5 - util
  ---
  duration_ms: 1.280412
  ...
1..5
# tests 5
# suites 0
# pass 4
# fail 1
# cancelled 0
# skipped 0
# todo 0
# duration_ms 85.20992

Judge Nemotron 3 Ultra, advisory

The rule rewrites the global `parseInt` to `Number.parseInt`, but the function parameter is also named `Number`, shadowing the global `Number` namespace. After the fix, `Number.parseInt` resolves to the parameter (a function), which lacks a `parseInt` property, causing a TypeError. The documentation does not mention this shadowing scenario, so the fix is not safe for this construct.

Explanation Nemotron 3 Super, model draft

The original code calls the parameter `Number` as a function to convert each value’s fractional part; this relies on the caller providing a suitable converter. After rewriting, it attempts to call `Number.parseInt`, which accesses a property of the global built‑in `Number` object rather than the passed‑in argument. Since the test supplies a plain number or other non‑object as the second argument, `Number.parseInt` does not exist, causing a TypeError where the original succeeded. Thus the change alters behavior when the injected `Number` is not the global constructor.

Upstream

Files

evidence sheetminimal.patch
full diff (10 lines)
diff -ruN -x .git -x node_modules -x .venv -x venv -x __pycache__ -x .pytest_cache -x .ruff_cache -x .mypy_cache -x dist -x build -x target -x .tox -x .nox -x runs base/web/src/parse.js rules/style_useNumberNamespace/web/src/parse.js
--- base/web/src/parse.js	2026-10-22 23:53:12.513778005 -0400
+++ rules/style_useNumberNamespace/web/src/parse.js	2026-10-22 23:53:15.082826329 -0400
@@ -1,4 +1,4 @@
 // Parse string values with a caller-supplied converter for the non-integer part.
 export function parseAll(values, Number) {
-  return values.map((v) => parseInt(v, 10) + Number(v));
+  return values.map((v) => Number.parseInt(v, 10) + Number(v));
 }

style/noUselessElsefix breaks the build

fix-breaks-build labelled safe exit 0 → exit 1 real · high
files changed
3: web/src/branch.js, web/src/negate.js, web/src/util.js
reduced to
1 of 3 hunk(s) in web/src/branch.js, 5 run(s); the patch was applied with git apply and reproduced the same difference
sites reported
3 → 0 in 3 linted file(s)

Change (reduced)

--- a/web/src/branch.js
+++ b/web/src/branch.js
@@ -2,8 +2,7 @@
   let text = "none";
   if (n > 0) {
     return "positive";
-  } else {
+  }
     let text = "non-positive";
     return text;
-  }
 }

Observed

stdout lines only before the fix:
  # Subtest: label
  ok 2 - label
  # pass 5
  # fail 0
stdout lines only after the fix:
  # file:///w/web/src/branch.js:N
  #     let text = "non-positive";
  #         ^
  # SyntaxError: Identifier 'text' has already been declared
  #     at compileSourceTextModule (node:internal/modules/esm/utils:346:16)
  #     at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:146:18)
  #     at \#translate (node:internal/modules/esm/loader:497:12)
  #     at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:544:27)
  # Node.js v20.20.0
  # Subtest: /w/web/test/branch.test.js
  not ok 2 - /w/web/test/branch.test.js
    location: '/w/web/test/branch.test.js:N'
    failureType: 'testCodeFailure'
    exitCode: 1
    signal: ~
    error: 'test failed'
    code: 'ERR_TEST_FAILURE'
  # pass 4
  # fail 1
exit 0 → 1

Output after tail

...
# Subtest: pick
ok 3 - pick
  ---
  duration_ms: 0.935766
  ...
# Subtest: parseAll adds the converter's value
ok 4 - parseAll adds the converter's value
  ---
  duration_ms: 1.267664
  ...
# Subtest: util
ok 5 - util
  ---
  duration_ms: 1.244429
  ...
1..5
# tests 5
# suites 0
# pass 4
# fail 1
# cancelled 0
# skipped 0
# todo 0
# duration_ms 87.322452

Judge Nemotron 3 Ultra, advisory

The fix hoists the `let text` declaration from the `else` block into the outer scope where `let text = "none"` already exists, creating a duplicate declaration that makes the file fail to parse. The documentation presents the rewrite as equivalent but does not account for variable shadowing across the removed block boundary.

Explanation Nemotron 3 Super, model draft

The rewrite moves `let text = \"non-positive\";` outside the `else` block, causing it to execute unconditionally when `n <= 0`. Since `let text = \"none\"` was already declared in the same scope, this creates a duplicate declaration of `text`, which is invalid in JavaScript and results in a syntax error during module parsing—changing behavior from successful execution to immediate failure.

Upstream

Files

evidence sheetminimal.patch
full diff (35 lines)
diff -ruN -x .git -x node_modules -x .venv -x venv -x __pycache__ -x .pytest_cache -x .ruff_cache -x .mypy_cache -x dist -x build -x target -x .tox -x .nox -x runs base/web/src/branch.js rules/style_noUselessElse/web/src/branch.js
--- base/web/src/branch.js	2026-10-22 23:53:12.513778005 -0400
+++ rules/style_noUselessElse/web/src/branch.js	2026-10-22 23:53:15.071826122 -0400
@@ -2,8 +2,7 @@
   let text = "none";
   if (n > 0) {
     return "positive";
-  } else {
+  }
     let text = "non-positive";
     return text;
-  }
 }
diff -ruN -x .git -x node_modules -x .venv -x venv -x __pycache__ -x .pytest_cache -x .ruff_cache -x .mypy_cache -x dist -x build -x target -x .tox -x .nox -x runs base/web/src/negate.js rules/style_noUselessElse/web/src/negate.js
--- base/web/src/negate.js	2026-10-22 23:53:12.513778005 -0400
+++ rules/style_noUselessElse/web/src/negate.js	2026-10-22 23:53:15.071826122 -0400
@@ -1,4 +1,4 @@
 export function pick(ok, a, b) {
   if (!ok) return a
-  else return b
+  return b
 }
diff -ruN -x .git -x node_modules -x .venv -x venv -x __pycache__ -x .pytest_cache -x .ruff_cache -x .mypy_cache -x dist -x build -x target -x .tox -x .nox -x runs base/web/src/util.js rules/style_noUselessElse/web/src/util.js
--- base/web/src/util.js	2026-10-22 23:53:12.513778005 -0400
+++ rules/style_noUselessElse/web/src/util.js	2026-10-22 23:53:15.072826141 -0400
@@ -11,7 +11,6 @@
 export function describe(n) {
   if (n < 0) {
     return "negative";
-  } else {
-    return "non-negative";
   }
+    return "non-negative";
 }

Applied without a difference

1 rule(s) changed 2 file(s) with no difference under the command, applied together. accepted.patch applies with git apply -p1. style/useConst