no-unnecessary-await

March 27, 2026 ยท View on GitHub

๐Ÿ“ Disallow awaiting non-promise values.

๐Ÿ’ผ This rule is enabled in the following configs: โœ… recommended, โ˜‘๏ธ unopinionated.

๐Ÿ”ง This rule is automatically fixable by the --fix CLI option.

The await operator should only be used on Promise values.

Examples

// โŒ
await await promise;

// โœ…
await promise;
// โŒ
await [promise1, promise2];

// โœ…
await Promise.allSettled([promise1, promise2]);