# no-thenable

Rule `unicorn/no-thenable`. Disallow `then` property.

- Source: unicorn
- Technologies: JavaScript
- Kind: correctness
- Needs type information: no
- Autofix: no
- Reach: 91.3M weekly downloads of presets that enable it
- Trend: +126.8% last quarter
- Rank: #202 by reach, #97 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `unicorn/no-thenable` | no | no | package `eslint-plugin-unicorn` | [docs](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v80.0.0/docs/rules/no-thenable.md) |
| Oxlint | `unicorn/no-thenable` | yes | no | plugin `unicorn`, category correctness | [docs](https://oxc.rs/docs/guide/usage/linter/rules/unicorn/no-thenable.html) |
| Biome | `suspicious/noThenProperty` | yes | no | group suspicious, since 1.5.0 | [docs](https://biomejs.dev/linter/rules/no-then-property/) |

## Code examples

### Incorrect: the rule reports this

```js
const foo = {
  unicorn: 1,
  then() {},
};

const {unicorn} = await foo;

console.log('after'); //<- This will never execute
```

```js
const foo = {
  unicorn: 1,
  then() {
    throw new Error('You shouldn’t have called me')
  },
};

const {unicorn} = await foo;
// Error: You shouldn’t have called me
```

```js
// foo.js

export function then () {
  throw new Error('You shouldn’t have called me')
}
```

### Correct: the rule accepts this

```js
export {resolve};
```

```js
const foo = {
  success() {}
};
```

```js
const foo = {
  get success() {}
};
```

Examples from the ESLint documentation.

## Enable it

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

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

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

### Oxlint: `.oxlintrc.json`

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

### Biome: `biome.json`

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

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Oxlint default](https://lintradar.dev/presets/oxlint-default.md) | Oxlint | `oxlint` | 111 | 50.8M | +183.6% |
| [Biome recommended](https://lintradar.dev/presets/biome-recommended.md) | Biome | `@biomejs/biome` | 491 | 28.5M | +106.8% |
| [Unicorn recommended](https://lintradar.dev/presets/unicorn-recommended.md) | ESLint | `eslint-plugin-unicorn` | 340 | 9.5M | +30.3% |
| [Unicorn unopinionated](https://lintradar.dev/presets/unicorn-unopinionated.md) | ESLint | `eslint-plugin-unicorn` | 236 | 9.5M | +30.3% |
| [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% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |

## Related rules

- [unicorn/no-single-promise-in-promise-methods](https://lintradar.dev/rules/unicorn/no-single-promise-in-promise-methods.md): Disallow passing single-element arrays to `Promise` methods.
- [unicorn/no-useless-fallback-in-spread](https://lintradar.dev/rules/unicorn/no-useless-fallback-in-spread.md): Disallow useless fallback when spreading in object literals.
- [unicorn/no-invalid-remove-event-listener](https://lintradar.dev/rules/unicorn/no-invalid-remove-event-listener.md): Prevent calling `EventTarget#removeEventListener()` with the result of an expression.
- [unicorn/no-useless-length-check](https://lintradar.dev/rules/unicorn/no-useless-length-check.md): Disallow useless array length check.
- [unicorn/no-invalid-fetch-options](https://lintradar.dev/rules/unicorn/no-invalid-fetch-options.md): Disallow invalid options in `fetch()` and `new Request()`.
- [unicorn/no-useless-spread](https://lintradar.dev/rules/unicorn/no-useless-spread.md): Disallow unnecessary spread.

---

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