> 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.6.5](https://github.com/web-infra-dev/rslint/releases/tag/v0.6.5)
## Configuration


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

export default defineConfig([
  js.configs.recommended,
  {
    rules: {
      'require-await': 'error',
    },
  },
]);
```

## Rule Details

This rule warns on async functions that have no `await` expression.

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

```javascript
async function foo() {
  doSomething();
}

bar(async () => {
  doSomething();
});
```

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

```javascript
async function foo() {
  await doSomething();
}

bar(async () => {
  await doSomething();
});

function baz() {
  doSomething();
}

bar(() => {
  doSomething();
});

async function noop() {}
```

Async generator functions are ignored by this rule.

## When Not To Use It

If you don't want to warn on async functions that have no `await` expression, then it's safe to disable this rule.

## Original Documentation

- [ESLint: require-await](https://eslint.org/docs/latest/rules/require-await)
- [Source code](https://github.com/eslint/eslint/blob/v10.8.1/lib/rules/require-await.js)
