Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkwaiblinger committed Dec 7, 2023
1 parent d14de70 commit 428b976
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/eslint-plugin/docs/rules/no-floating-promises.md
Expand Up @@ -17,7 +17,7 @@ Valid ways of handling a Promise-valued statement include:
- Calling its `.then()` with two arguments
- Calling its `.catch()` with one argument

This rule also reports when an array of Promises is created and not properly handled. The main way to resolve this is by using one of the Promise concurrency methods to create a single promise, then handling that according to the procedure above. These methods include:
This rule also reports when an Array containing Promises is created and not properly handled. The main way to resolve this is by using one of the Promise concurrency methods to create a single Promise, then handling that according to the procedure above. These methods include:

- `Promise.all()`,
- `Promise.allSettled()`,
Expand Down Expand Up @@ -115,3 +115,7 @@ If you do not use Promise-like values in your codebase, or want to allow them to
## Related To

- [`no-misused-promises`](./no-misused-promises.md)

## Further Reading

- ["Using Promises" MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises). Note especially the sections on [Promise rejection events](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#promise_rejection_events) and [Composition](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#composition).

0 comments on commit 428b976

Please sign in to comment.