Closed
Description
Before You File a Documentation Request Please Confirm You Have Done The Following...
- I have looked for existing open or closed documentation requests that match my proposal.
- I have read the FAQ and my problem is not listed.
Suggested Changes
I fixed a no-floating-promises error by changing:
- promise.catch(() => {}).then(() => {})
+ promise.catch(() => {}).finally(() => {})
I think this is a good change! Since my .catch()
handler couldn't reject, it's probably not even a change.
The .catch().then()
form is mentioned on MDN and triggers this rule (playground). So it would be helpful if the docs on this rule included an example of the suggested refactor.