# 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, but the program declares a local variable named Number that shadows the global Number object. After the fix, Number.parseInt attempts to access a property on the number 42, which is undefined, causing a TypeError that is caught silently, so nothing is printed. The documentation does not mention this shadowing scenario, and the construct (a local variable named Number) is legal and plausible.
- Program: minimized from 6 to 5 lines

## Reproducer

```js
let Number = 42;
try {
  console.log(typeof parseInt('1'));
} catch (e) {
}
```

## Commands

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

## Observed

```
stdout before:
number
stdout after:
```

## Diff applied by the fix

```diff
--- orig.js	2026-10-22 13:35:37.193207789 -0400
+++ fixed.js	2026-10-22 13:35:39.157240934 -0400
@@ -1,5 +1,5 @@
 let Number = 42;
 try {
-  console.log(typeof parseInt('1'));
+  console.log(typeof Number.parseInt('1'));
 } catch (e) {
 }
```

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

The original `parseInt` refers to the global function; rewriting it as `Number.parseInt` accesses a property on the local variable `Number`, which holds the number 42 and has no such method, causing `undefined` to be passed to `typeof`. Since `typeof undefined` yields `"undefined"` instead of `"function"`, the output changes from `"number"` to nothing, altering program behavior. This substitution is invalid because it assumes `Number` denotes the built‑in constructor, but the program shadows it with a numeric value.

## Upstream search

Queries: "useNumberNamespace fix", "style useNumberNamespace global variable shadowing", "style useNumberNamespace built-in method call rewrite", "style useNumberNamespace typeof expression transformation"

- related: https://github.com/biomejs/biome/issues/1228
  same rule useNumberNamespace implementation tracking
- related: https://github.com/biomejs/biome/issues/3578
  same rule useNumberNamespace but different construct Infinity property
- related: https://github.com/biomejs/biome/issues/2075
  same rule useNumberNamespace but different construct isNaN function

<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] 🐛 invalid value: string "[object Object]", expected relative URL without a base · Issue #6321 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/6321
- [tavily] 💅 useConsistentTypeDefinitions should ignore interfaces in global declarations · Issue #8449 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/8449
- [tavily] 💅 useNamingConvention is a bit too aggressive · Issue #7575 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/7575
- [tavily] 💅 `2.3.14` introduces incorrect behavior to `useExhaustiveDeps` · Issue #8958 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/8958
- [tavily] 💅 `lint/correctness/noStringCaseMismatch` false positives · Issue #3134 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/3134
- [tavily] 💅 `useNamingConvention` fix breaks code · Issue #4873 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/4873
- [tavily] 💅 Transform a function with generics to arrow function by biome linter will not safe. · Issue #3292 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/3292

</details>
