# no-floating-promises

Rule `typescript/no-floating-promises`. Require Promise-like statements to be handled appropriately

- Source: typescript
- Technologies: TypeScript
- Kind: correctness
- Needs type information: yes
- Autofix: yes, in at least one linter
- Reach: 126.5M weekly downloads of presets that enable it
- Trend: +87.3% last quarter
- Rank: #136 by reach, #397 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `@typescript-eslint/no-floating-promises` | no | suggestion | package `@typescript-eslint/eslint-plugin` | [docs](https://typescript-eslint.io/rules/no-floating-promises) |
| Oxlint | `typescript/no-floating-promises` | yes | safe | plugin `typescript`, category correctness | [docs](https://oxc.rs/docs/guide/usage/linter/rules/typescript/no-floating-promises.html) |
| Biome | `nursery/noFloatingPromises` | yes | unsafe | group nursery, since 2.0.0 | [docs](https://biomejs.dev/linter/rules/no-floating-promises/) |

## Code examples

### Incorrect: the rule reports this

```ts
const promise = new Promise((resolve, reject) => resolve('value'));
promise;

async function returnsPromise() {
  return 'value';
}
returnsPromise().then(() => {});

Promise.reject('value').catch();

Promise.reject('value').finally();

[1, 2, 3].map(async x => x + 1);
```

### Correct: the rule accepts this

```ts
const promise = new Promise((resolve, reject) => resolve('value'));
await promise;

async function returnsPromise() {
  return 'value';
}

void returnsPromise();

returnsPromise().then(
  () => {},
  () => {},
);

Promise.reject('value').catch(() => {});

await Promise.reject('value').finally(() => {});

await Promise.all([1, 2, 3].map(async x => x + 1));
```

Examples from the ESLint documentation.

## Enable it

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

```js
import tseslint from "typescript-eslint";

export default [
  {
    plugins: { "@typescript-eslint": tseslint.plugin },
    rules: {
      "@typescript-eslint/no-floating-promises": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "typescript/no-floating-promises": "error"
  }
}
```

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "nursery": {
        "noFloatingPromises": "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% |
| [typescript-eslint strict type-checked](https://lintradar.dev/presets/typescript-eslint-strict-type-checked.md) | ESLint | `@typescript-eslint/eslint-plugin` | 75 | 175.9M | +29.5% |
| [typescript-eslint recommended type-checked](https://lintradar.dev/presets/typescript-eslint-recommended-type-checked.md) | ESLint | `@typescript-eslint/eslint-plugin` | 47 | 175.9M | +29.5% |
| [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% |
| [Google TypeScript Style](https://lintradar.dev/presets/gts.md) | ESLint | `gts` | 71 | 553.3K | +10.3% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |
| [eslint-config-love](https://lintradar.dev/presets/love.md) | ESLint | `eslint-config-love` | 258 | 171.7K | +39.3% |

## Related rules

- [typescript/no-array-delete](https://lintradar.dev/rules/typescript/no-array-delete.md): Disallow using the `delete` operator on array values
- [typescript/no-duplicate-type-constituents](https://lintradar.dev/rules/typescript/no-duplicate-type-constituents.md): Disallow duplicate constituents of union or intersection types
- [typescript/no-unsafe-unary-minus](https://lintradar.dev/rules/typescript/no-unsafe-unary-minus.md): Require unary negation to take a number
- [typescript/no-redundant-type-constituents](https://lintradar.dev/rules/typescript/no-redundant-type-constituents.md): Disallow members of unions and intersections that do nothing or override type information
- [typescript/no-require-imports](https://lintradar.dev/rules/typescript/no-require-imports.md): Disallow invocation of `require()`
- [typescript/no-namespace](https://lintradar.dev/rules/typescript/no-namespace.md): Disallow TypeScript namespaces

---

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