# prefer-await-to-then

Rule `promise/prefer-await-to-then`. Prefer `await` to `then()`/`catch()`/`finally()` for reading Promise values.

- Source: promise
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: no
- Reach: 0 weekly downloads of presets that enable it
- Trend: 0% last quarter
- Rank: #1769 by reach

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `promise/prefer-await-to-then` | no | no | package `eslint-plugin-promise` | [docs](https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md) |
| Oxlint | `promise/prefer-await-to-then` | no | no | plugin `promise`, category style | [docs](https://oxc.rs/docs/guide/usage/linter/rules/promise/prefer-await-to-then.html) |

## Code examples

### Incorrect: the rule reports this

```js
function example() {
  return myPromise.then(doSomethingSync).then(doSomethingElseAsync)
}

function exampleTwo() {
  return myPromise
    .then(doSomethingSync)
    .then(doSomethingElseAsync)
    .catch(errors)
}

function exampleThree() {
  return myPromise.catch(errors)
}

function exampleFour() {
  return myPromise.finally(cleanup)
}
```

### Correct: the rule accepts this

```js
async function example() {
  let val = await myPromise()
  val = doSomethingSync(val)
  return doSomethingElseAsync(val)
}

async function exampleTwo() {
  try {
    let val = await myPromise()
    val = doSomethingSync(val)
    return await doSomethingElseAsync(val)
  } catch (err) {
    errors(err)
  }
}
```

Examples from the ESLint documentation.

## Enable it

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

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

export default [
  {
    plugins: { promise },
    rules: {
      "promise/prefer-await-to-then": "error",
    },
  },
];
```

### Oxlint: `.oxlintrc.json`

```json
{
  "plugins": [
    "promise"
  ],
  "rules": {
    "promise/prefer-await-to-then": "error"
  }
}
```

## Related rules

- [promise/spec-only](https://lintradar.dev/rules/promise/spec-only.md): Disallow use of non-standard Promise static methods.
- [promise/prefer-await-to-callbacks](https://lintradar.dev/rules/promise/prefer-await-to-callbacks.md): Prefer `async`/`await` to the callback pattern.
- [promise/prefer-catch](https://lintradar.dev/rules/promise/prefer-catch.md): Prefer `catch` to `then(a, b)`/`then(null, b)` for handling errors.
- [promise/no-multiple-resolved](https://lintradar.dev/rules/promise/no-multiple-resolved.md): Disallow creating new promises with paths that resolve multiple times.
- [promise/avoid-new](https://lintradar.dev/rules/promise/avoid-new.md): Disallow creating `new` promises outside of utility libs (use [util.promisify][] instead).
- [promise/no-native](https://lintradar.dev/rules/promise/no-native.md): Require creating a `Promise` constructor before using it in an ES5 environment.

---

Web page: https://lintradar.dev/rules/promise/prefer-await-to-then. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
