# 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 explicitly defines Number as undefined on the global object. This causes a runtime ReferenceError in the fixed code where the original succeeded, which is a semantic change not documented as intended.
- Program: minimized from 9 to 7 lines

## Reproducer

```js
const g = Function('return this')();
defineProperty(g, 'Number', { value: undefined });
try {
  console.log(parseInt('1'));
} catch (e) {
}
function defineProperty(obj, name, desc) { Object.defineProperty(obj, name, desc); }
```

## Commands

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

## Observed

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

## Diff applied by the fix

```diff
--- orig.js	2026-10-22 13:35:30.844100649 -0400
+++ fixed.js	2026-10-22 13:35:32.800133656 -0400
@@ -1,7 +1,7 @@
 const g = Function('return this')();
 defineProperty(g, 'Number', { value: undefined });
 try {
-  console.log(parseInt('1'));
+  console.log(Number.parseInt('1'));
 } catch (e) {
 }
 function defineProperty(obj, name, desc) { Object.defineProperty(obj, name, desc); }
```

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

The original `parseInt` refers to the global function, which remains unaffected because `g.Number` is set on a separate object (`g`) that does not shadow the global `Number`. After rewriting to `Number.parseInt`, the call accesses the `parseInt` method on the global `Number` object, but since `g.Number` was set to `undefined` and `g` is the global object (via `Function('return this')()`), the global `Number` constructor is overridden with `undefined`, making `Number.parseInt` inaccessible and causing a TypeError that is caught, resulting in no output. Thus, the change alters which `Number` is accessed, breaking semantics.

## Upstream search

Queries: "useNumberNamespace fix", "style/useNumberNamespace parseInt call", "useNumberNamespace global Number methods", "style useNumberNamespace built-in functions"

- related: https://github.com/biomejs/biome/issues/1228
  same rule (useNumberNamespace) but about implementing the rule, not a fix-changes-behavior defect on parseInt
- related: https://github.com/biomejs/biome/issues/3578
  same rule (useNumberNamespace) but about incorrect error message for Infinity, not parseInt fix changing behavior
- related: https://github.com/biomejs/biome/issues/2075
  same rule (useNumberNamespace) but about isNaN replacement being a different function, not parseInt

<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] 📝 lineWidth doesn't wrap comments · Issue #7075 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/7075
- [tavily] 📝 Formatter breaks dot notation in Svelte component names · Issue #9300 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/9300
- [tavily] 💅 `useNodejsImportProtocol` gets thrown although a npm package is installed with the same name  · Issue #3066 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/3066
- [github, closed] 🐛 Memory leak in `biome.exe` — https://github.com/biomejs/biome/issues/6784
- [tavily] 💅 `2.3.14` introduces incorrect behavior to `useExhaustiveDeps` · Issue #8958 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/8958
- [tavily] 🐛 `noFloatingPromises` inconsistent behavior in 2.5.8+ · Issue #11529 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/11529
- [tavily] 💅 Unused imports when the import is used inside JSDoc syntax · Issue #4677 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/4677
- [tavily] 2.0.0-beta.1 too agressive role — https://github.com/biomejs/biome/issues/5446

</details>
