# noGlobalIsNan

Rule `biome/noGlobalIsNan`. Use `Number.isNaN` instead of global `isNaN`.

- Source: biome
- Technologies: JavaScript
- Kind: suspicious
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 30.6M weekly downloads of presets that enable it
- Trend: +109.3% last quarter
- Rank: #519 by reach, #154 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `suspicious/noGlobalIsNan` | yes | unsafe | group suspicious, since 1.0.0 | [docs](https://biomejs.dev/linter/rules/no-global-is-nan/) |

## Code examples

### Incorrect: the rule reports this

```js
isNaN({}); // true
```

### Correct: the rule accepts this

```js
Number.isNaN({}); // false
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "noGlobalIsNan": "error"
      }
    }
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Ultracite for Biome](https://lintradar.dev/presets/ultracite-biome.md) | Biome | `ultracite` | 616 | 2.1M | +151.7% |

## Related rules

- [biome/noGlobalIsFinite](https://lintradar.dev/rules/biome/noGlobalIsFinite.md): Use `Number.isFinite` instead of global `isFinite`.
- [biome/noImplicitAnyLet](https://lintradar.dev/rules/biome/noImplicitAnyLet.md): Disallow use of implicit `any` type on variable declarations.
- [biome/noFlatMapIdentity](https://lintradar.dev/rules/biome/noFlatMapIdentity.md): Disallow to use unnecessary callback on `flatMap`.
- [biome/noImportantInKeyframe](https://lintradar.dev/rules/biome/noImportantInKeyframe.md): Disallow `!important` in `@keyframes` declarations.
- [biome/noEmptyTypeParameters](https://lintradar.dev/rules/biome/noEmptyTypeParameters.md): Disallow empty type parameters in type aliases and interfaces.
- [biome/noInvalidDirectionInLinearGradient](https://lintradar.dev/rules/biome/noInvalidDirectionInLinearGradient.md): Disallow non-standard directions in linear gradients.

---

Web page: https://lintradar.dev/rules/biome/noGlobalIsNan. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
