-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
docs: [no-floating-promises] clarify that void does not resolve promises #9949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: [no-floating-promises] clarify that void does not resolve promises #9949
Conversation
Thanks for the PR, @alexandercerutti! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sending this in! Sorry for leaving so many comments - the promise docs in general, and especially this rule, deal with quite a bit of subtle nuance.
I'll let Kirk take on this since apparently he has a lot of opinions while I have much fewer, but if either of you want to add anything to https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises#error_handling, and maybe eventually link to it on this doc page, I'd be glad to review a PR over there on MDN. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9949 +/- ##
=======================================
Coverage 88.70% 88.70%
=======================================
Files 426 426
Lines 14835 14835
Branches 4312 4312
=======================================
Hits 13159 13159
Misses 1533 1533
Partials 143 143
Flags with carried forward coverage won't be shown. Click here to find out more. |
@Josh-Cena I've added a link to MDN page you linked in order to improve the warning explanation. |
@kirkwaiblinger I've written a paragraph about Promises handling and linked it to the Once the changes are ready, I'll merge the base branch into this (again). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just need resolution on #9949 (comment)
@kirkwaiblinger done, removed. Should I remove even the warn? |
No, the warn admonition is great! 👌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(once another member gets a chance to review, they'll merge it in, and if all goes well this will go out with our next Monday release 🙂) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Just some small suggestions.
Co-authored-by: Josh Goldberg ✨ <git@joshuakgoldberg.com>
bf8343d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yay!
PR Checklist
Overview
Reworded some points of no-floating-promises and added a warn under
ignoreVoid
option.