# no-await-expression-member

Rule `unicorn/no-await-expression-member`. Disallow member access from await expression.

- Source: unicorn
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 12M weekly downloads of presets that enable it
- Trend: +40.1% last quarter
- Rank: #824 by reach, #1020 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `unicorn/no-await-expression-member` | no | safe | package `eslint-plugin-unicorn` | [docs](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v80.0.0/docs/rules/no-await-expression-member.md) |
| Oxlint | `unicorn/no-await-expression-member` | no | unsafe | plugin `unicorn`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/unicorn/no-await-expression-member.html) |

## Code examples

### Incorrect: the rule reports this

```js
const foo = (await import('./foo.js')).default;
```

```js
const secondElement = (await getArray())[1];
```

```js
const property = (await getObject()).property;
```

### Correct: the rule accepts this

```js
const {default: foo} = await import('./foo.js');
```

```js
const [, secondElement] = await getArray();
```

```js
const {property} = await getObject();
```

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-await-expression-member": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "rules": {
    "unicorn/no-await-expression-member": "error"
  }
}
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Unicorn recommended](https://lintradar.dev/presets/unicorn-recommended.md) | ESLint | `eslint-plugin-unicorn` | 340 | 9.5M | +30.3% |
| [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/empty-brace-spaces](https://lintradar.dev/rules/unicorn/empty-brace-spaces.md): Enforce no spaces between braces.
- [unicorn/no-confusing-array-with](https://lintradar.dev/rules/unicorn/no-confusing-array-with.md): Disallow confusing uses of `Array#with()`.
- [unicorn/consistent-template-literal-escape](https://lintradar.dev/rules/unicorn/consistent-template-literal-escape.md): Enforce consistent style for escaping `${` in template literals.
- [unicorn/prefer-export-from](https://lintradar.dev/rules/unicorn/prefer-export-from.md): Prefer `export…from` when re-exporting.
- [unicorn/consistent-assert](https://lintradar.dev/rules/unicorn/consistent-assert.md): Enforce consistent assertion style with `node:assert`.
- [unicorn/prefer-spread](https://lintradar.dev/rules/unicorn/prefer-spread.md): Prefer the spread operator over `Array.from(…)`, `Array#concat(…)`, `Array#{slice,toSpliced}()`, and trivial `for…of` copies.

---

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