# biome style/useNumberNamespace: fix changes program behavior

Internal evidence sheet generated by fixhunt. 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
- Rule: style/useNumberNamespace (tool labels the fix: safe, this fix reported as safe)
- Oracle: fix-changes-behavior
- Judge (Nemotron 3 Ultra, advisory): real, severity medium. The rule rewrites global parseInt to Number.parseInt assuming the global Number object, but the program declares a local const Number that shadows it. The documentation does not mention this shadowing case, so the fix changes behavior in plausible code where a variable named Number exists in scope.
- Program: minimized from 4 to 4 lines

## Reproducer

```js
{
  const Number = { parseInt: () => 999 };
  console.log(parseInt('1'));
}
```

## Commands

```sh
node prog.js
bunx @biomejs/biome lint --only=style/useNumberNamespace --write prog.js
node prog.js
```

## Observed

```
stdout before:
1
stdout after:
999
```

## Diff applied by the fix

```diff
--- orig.js	2026-10-22 13:35:48.301395265 -0400
+++ fixed.js	2026-10-22 13:35:50.839438106 -0400
@@ -1,4 +1,4 @@
 {
   const Number = { parseInt: () => 999 };
-  console.log(parseInt('1'));
+  console.log(Number.parseInt('1'));
 }
```

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

The original call `parseInt('1')` refers to the global built-in function because no local variable named `parseInt` exists in scope; it returns 1. After rewriting, `Number.parseInt('1')` accesses the property of the locally declared constant `Number`, which overrides the global `Number` constructor and defines `parseInt` to return 999, changing the output. The rewrite alters which function is invoked due to the local binding of `Number`.

## Upstream search

Queries: "useNumberNamespace fix", "style useNumberNamespace global parseInt", "style useNumberNamespace shadowing Number", "style useNumberNamespace local variable conflict"

- related: https://github.com/biomejs/biome/issues/1228
  same rule (useNumberNamespace) but about implementing the rule, not a fix-changes-behavior defect
- related: https://github.com/biomejs/biome/issues/3578
  same rule (useNumberNamespace) but about incorrect error message for Infinity, not fix-changes-behavior on parseInt
- duplicate: https://github.com/biomejs/biome/issues/2075
  same rule (useNumberNamespace) and same defect class: fix replaces global isNaN/parseInt with Number.namespaced version which has different semantics when Number is shadowed

<details><summary>All hits</summary>

- [github, open] 💅 `noUnnecessaryConditions`: false positive on an overloaded call with `undefined` as the default argument (Vue `inject`) — https://github.com/biomejs/biome/issues/12040
- [github, open] 💅 `noSkippedTests` conditionally skip fix suggestion — https://github.com/biomejs/biome/issues/9295
- [github, open] 💅 useLiteralKeys flags `__proto__` in a computed member expression and offers an unsafe fix that conflicts with noProto — https://github.com/biomejs/biome/issues/10769
- [github, open] Extension chokes on large files — https://github.com/biomejs/biome/issues/3860
- [github, open] 💅 noLeakedRender false positive when using useState<boolean> — https://github.com/biomejs/biome/issues/10790
- [github, open] 💅 `lint/correctness/noUnusedImports` does not consider uses inside comments that precede non-declaration statements (start/end of file, etc.) — https://github.com/biomejs/biome/issues/8762
- [github, closed] 💅 `useSimplifiedLogicExpression` "safe" fix breaks code — https://github.com/biomejs/biome/issues/11351
- [github, closed] 💅 `useExplicitLengthCheck` false positive and broken fix — https://github.com/biomejs/biome/issues/11558
- [github, closed] 💅 Performance regression in noFloatingPromises in 2.5.6+ (and is still an issue in 2.5.11) — https://github.com/biomejs/biome/issues/11534
- [github, closed] 💅 noUselessTernary double space in quick fix — https://github.com/biomejs/biome/issues/11092
- [tavily] 📎 Implement `lint/useNumberNamespace` - `eslint-unicorn/prefer-number-properties` · Issue #1228 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/1228
- [tavily] 📝 Astro JSX-like syntax can't be parsed without errors · Issue #7871 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/7871
- [tavily] 🐛 `--write` applies fixes to all rules ignoring `--only` · Issue #3470 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/3470
- [tavily] 💅 Incorrect error message when type `Infinity` · Issue #3578 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/3578
- [tavily] 💅 Biome replaces isNan by Number.isNan, which is a different function · Issue #2075 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/2075
- [tavily] biome migrate --write accesses the whole filesystem, takes minutes · Issue #7361 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/7361
- [tavily] unknownAtRules error for tailwind v4 · Issue #7223 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/7223
- [tavily] `Astro`: multiple new lint errrors from `v2.4.7` or newer · Issue #9589 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/9589
- [tavily] 💅 @tailwind directive warns in Biome 2.3 even with `css.parser.tailwindDirectives` enabled · Issue #7899 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/7899
- [github, closed] 💅 `nusery/noShadow` should not flag parameter names of function types — https://github.com/biomejs/biome/issues/9482
- [tavily] 💅 `nursery/noShadow` incorrectly flags Typescript constructor overload parameters in constructor implementation, class methods · Issue #7125 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/7125
- [tavily] [Beta 2.0] False positive for lint/correctness/noUnusedImports — https://github.com/biomejs/biome/issues/6144

</details>
