Skip to content

Commit

Permalink
Update no-await-in-promise-methods.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker authored and Clement398 committed Feb 7, 2024
1 parent 88d2283 commit 141f801
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/rules/no-await-in-promise-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ Awaited promises in `Promise.all()`, `Promise.allSettled()`, `Promise.any()`, or
## Fail

```js
Promise.all([await promise1, promise2]);
Promise.all([await promise, anotherPromise]);

Promise.allSettled([await promise1, promise2]);
Promise.allSettled([await promise, anotherPromise]);

Promise.any([await promise1, promise2]);
Promise.any([await promise, anotherPromise]);

Promise.race([await promise1, promise2]);
Promise.race([await promise, anotherPromise]);
```

## Pass

```js
Promise.all([promise1, promise2]);
Promise.all([promise, anotherPromise]);

Promise.allSettled([promise1, promise2]);
Promise.allSettled([promise, anotherPromise]);

Promise.any([promise1, promise2]);
Promise.any([promise, anotherPromise]);

Promise.race([promise1, promise2]);
Promise.race([promise, anotherPromise]);
```

0 comments on commit 141f801

Please sign in to comment.