> For AI agents: the complete documentation index is available at https://rslint.rs/llms.txt, the full documentation bundle is available at https://rslint.rs/llms-full.txt.

# require-await

[Added in v0.1.4](https://github.com/web-infra-dev/rslint/releases/tag/v0.1.4)
## Configuration

| Preset                              | Configured Value |
| ----------------------------------- | ---------------- |
| ✅ ts.configs.recommendedTypeChecked | `"error"`        |
| ✅ ts.configs.strictTypeChecked      | `"error"`        |


```ts title=rslint.config.ts
import { defineConfig, ts } from '@rslint/core';

export default defineConfig([
  ts.configs.recommended,
  {
    rules: {
      '@typescript-eslint/require-await': 'error',
    },
  },
]);
```

## Rule Details

Disallow async functions which have no `await` expression. Asynchronous functions that do not use `await` might not need to be asynchronous, and may be the unintentional result of refactoring. They also cause a performance penalty by wrapping the function return value in an extra `Promise`.

This rule extends the base ESLint `require-await` rule with TypeScript-specific support: it considers returning a thenable value from an async function as equivalent to using `await`, and also handles `for-await-of` loops, `yield*` on async iterables, and `using`/`await using` declarations.

Examples of **incorrect** code for this rule:

```typescript
async function foo() {
  return 'value';
}
async function bar() {
  doSomethingSync();
}
```

Examples of **correct** code for this rule:

```typescript
async function foo() {
  await doSomethingAsync();
}
async function bar() {
  return await fetchData();
}
function baz() {
  return 'value';
}
```

## Original Documentation

- [typescript-eslint: require-await](https://typescript-eslint.io/rules/require-await)
- [Source code](https://github.com/typescript-eslint/typescript-eslint/blob/v8.68.0/packages/eslint-plugin/src/rules/require-await.ts)
