Skip to content

Latest commit

Β 

History

History
30 lines (20 loc) Β· 915 Bytes

File metadata and controls

30 lines (20 loc) Β· 915 Bytes

no-unnecessary-await

πŸ“ 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]);