persona-community-5/.pnpm-store/v3/files/b7/138c2509f038108f579a156b1d37e78250134ca6948d0c28628f1e64a095411c0d39493230f2ffa67f02b6d33e6ca7057323deb994d3afa348c4e45d397cbc
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

26 lines
756 B
Plaintext

---
description: 'Disallow async functions which do not return promises and have no `await` expression.'
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
> 🛑 This file is source code, not the primary documentation location! 🛑
>
> See **https://typescript-eslint.io/rules/require-await** for documentation.
This rule extends the base [`eslint/require-await`](https://eslint.org/docs/rules/require-await) rule.
It uses type information to allow promise-returning functions to be marked as `async` without containing an `await` expression.
## Examples
Examples of **correct** code for this rule:
```ts
async function returnsPromise1() {
return Promise.resolve(1);
}
const returnsPromise2 = () => returnsPromise1();
```