# noPlaywrightMissingAwait

Rule `biome/noPlaywrightMissingAwait`. Enforce Playwright async APIs to be awaited or returned.

- Source: biome
- Technologies: Testing
- Kind: correctness
- 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: #532 by reach, #167 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| Biome | `correctness/noPlaywrightMissingAwait` | yes | unsafe | group correctness, since 2.4.2 | [docs](https://biomejs.dev/linter/rules/no-playwright-missing-await/) |

## Code examples

### Incorrect: the rule reports this

```js
test('example', async ({ page }) => {
    expect(page.getByRole('button')).toBeVisible();
});
```

```js
test('example', async ({ page }) => {
    test.step('step', async () => {});
});
```

### Correct: the rule accepts this

```js
test('example', async ({ page }) => {
    await expect(page.getByRole('button')).toBeVisible();
});
```

```js
test('example', async ({ page }) => {
    await test.step('step', async () => {});
});
```

```js
test('example', async ({ page }) => {
    return expect(page.getByRole('button')).toBeVisible();
});
```

Examples from the Biome documentation.

## Enable it

### Biome: `biome.json`

```json
{
  "linter": {
    "rules": {
      "correctness": {
        "noPlaywrightMissingAwait": "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/noObsoleteAttributes](https://lintradar.dev/rules/biome/noObsoleteAttributes.md): Disallow obsolete attributes on HTML elements.
- [biome/noPlaywrightUnsafeReferences](https://lintradar.dev/rules/biome/noPlaywrightUnsafeReferences.md): Disallow using variables from outside the function passed to `page.evaluate()` and `page.addInitScript()`.
- [biome/noMissingVarFunction](https://lintradar.dev/rules/biome/noMissingVarFunction.md): Require `var()` when using a declared CSS custom property.
- [biome/noQuickfixBiome](https://lintradar.dev/rules/biome/noQuickfixBiome.md): Disallow `quickfix.biome` in supported editor settings.
- [biome/noMisrefactoredShorthandAssign](https://lintradar.dev/rules/biome/noMisrefactoredShorthandAssign.md): Disallow shorthand assign when variable appears on both sides.
- [biome/noQwikUseVisibleTask](https://lintradar.dev/rules/biome/noQwikUseVisibleTask.md): Disallow `useVisibleTask$()` functions in Qwik components.

---

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