# no-instanceof-array

Rule `unicorn/no-instanceof-array`. Replaced by `unicorn/no-instanceof-builtins` which covers more cases.

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

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `unicorn/no-instanceof-array` | no | no | package `eslint-plugin-unicorn` | [docs](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v80.0.0/docs/deleted-and-deprecated-rules.md#no-instanceof-array) |
| Oxlint | `unicorn/no-instanceof-array` | no | safe | plugin `unicorn`, category pedantic | [docs](https://oxc.rs/docs/guide/usage/linter/rules/unicorn/no-instanceof-array.html) |
| Biome | `suspicious/useIsArray` | yes | unsafe | group suspicious, since 1.0.0 | [docs](https://biomejs.dev/linter/rules/use-is-array/) |

## Code examples

### Incorrect: the rule reports this

```js
array instanceof Array;
[1,2,3] instanceof Array;
```

### Correct: the rule accepts this

```js
Array.isArray(array);
Array.isArray([1,2,3]);
```

Examples from the Oxlint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
import unicorn from "eslint-plugin-unicorn";

export default [
  {
    plugins: { unicorn },
    rules: {
      "unicorn/no-instanceof-array": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "unicorn/no-instanceof-array": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "suspicious": {
        "useIsArray": "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% |
| [Ultracite for Oxlint](https://lintradar.dev/presets/ultracite-oxlint.md) | Oxlint | `ultracite` | 475 | 2.1M | +151.7% |

## Related rules

- [unicorn/no-async-promise-finally](https://lintradar.dev/rules/unicorn/no-async-promise-finally.md): Disallow async functions as `Promise#finally()` callbacks.
- [unicorn/no-unnecessary-splice](https://lintradar.dev/rules/unicorn/no-unnecessary-splice.md): Disallow `Array#splice()` when simpler alternatives exist.
- [unicorn/no-return-array-push](https://lintradar.dev/rules/unicorn/no-return-array-push.md): Disallow using the return value of `Array#push()` and `Array#unshift()`.
- [unicorn/no-late-event-control](https://lintradar.dev/rules/unicorn/no-late-event-control.md): Disallow event-control method calls after the synchronous event dispatch has finished.
- [unicorn/no-late-current-target-access](https://lintradar.dev/rules/unicorn/no-late-current-target-access.md): Disallow accessing `event.currentTarget` after the synchronous event dispatch has finished.
- [unicorn/no-duplicate-loops](https://lintradar.dev/rules/unicorn/no-duplicate-loops.md): Disallow `.map()` and `.filter()` in `for…of` and `for await…of` loop headers.

---

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