# biome style/useNumberNamespace on repo: fix changes the outcome of the project's command

Evidence sheet generated by fixhunt from a repository scan. Not an issue text. A human re-verifies, checks the
duplicates below, and writes the upstream report in their own words following the project's AI policy.

- Tool: biome 2.5.15 (fix labelled safe)
- Project: /home/sun/dev/diaghunt/demo/repo
- Command: `cd web && node --test` (exit 0 before, 1 after)
- Files changed by the fix: 1; reduced to 1 of 1 hunk(s) in web/src/parse.js (delta debugging complete; the patch below was applied with git apply and reproduced the same difference)
- Sites reported by the rule in 1 changed file(s): 1 before, 0 after the fix
- Judge (Nemotron 3 Ultra, advisory): real, severity medium. 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.

## Change (reduced; applies to the project with `git apply -p1`)

```diff
--- 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 of the command (last 40 lines)

Before:

```
TAP version 13
# Subtest: run logs both items
ok 1 - run logs both items
  ---
  duration_ms: 1.249256
  ...
# Subtest: label
ok 2 - label
  ---
  duration_ms: 0.928985
  ...
# Subtest: pick
ok 3 - pick
  ---
  duration_ms: 0.924077
  ...
# Subtest: parseAll adds the converter's value
ok 4 - parseAll adds the converter's value
  ---
  duration_ms: 1.250568
  ...
# Subtest: util
ok 5 - util
  ---
  duration_ms: 1.304258
  ...
1..5
# tests 5
# suites 0
# pass 5
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 84.622619
```

After:

```
# Subtest: pick
ok 3 - pick
  ---
  duration_ms: 0.928795
  ...
# Subtest: parseAll adds the converter's value
not ok 4 - parseAll adds the converter's value
  ---
  duration_ms: 1.069556
  location: '/w/web/test/parse.test.js:5:1'
  failureType: 'testCodeFailure'
  error: 'Number.parseInt is not a function'
  code: 'ERR_TEST_FAILURE'
  name: 'TypeError'
  stack: |-
    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
```

## Why the rewrite is not equivalent (model draft, verify before use)

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 search

Queries: "useNumberNamespace fix", "style/useNumberNamespace parseInt call", "Biome lint rule useNumberNamespace", "fix changes Number to Number.parseInt"

- related: https://github.com/biomejs/biome/issues/11351
- related: https://github.com/biomejs/biome/issues/11558
- related: https://github.com/biomejs/biome/issues/1228
- related: https://github.com/biomejs/biome/issues/3578
- related: https://github.com/biomejs/biome/issues/2075

## Reproduce

```sh
# /home/sun/dev/diaghunt/demo/repo: apply the change above (minimal.patch), then run the command
git apply -p1 minimal.patch
cd web && node --test
# or run the fixer itself on the changed files
bunx @biomejs/biome lint --only=style/useNumberNamespace --write 'web/src/parse.js'
```
