Skip to content
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

require-returns: check for Promise executor #683

Merged
merged 10 commits into from
Jan 31, 2021

Conversation

brettz9
Copy link
Collaborator

@brettz9 brettz9 commented Jan 29, 2021

feat(require-returns): if function returns a Promise whose executor resolves with undefined, avoid need to document unless forceReturnsWithAsync is set; fixes #550

Note that if this is merged, #682 will need to add mention that our resolve detection is not fully complete either, since there are more edge cases where this PR does not check. But I expect it is a good beginning.

@brettz9 brettz9 requested a review from golopot January 29, 2021 06:55
@brettz9 brettz9 changed the title require-returns: check for executor require-returns: check for Promise executor Jan 29, 2021
… resolves with undefined, avoid need to document unless `forceReturnsWithAsync` is set; fixes gajus#550
Also ignores coverage-focused test for README
@brettz9 brettz9 merged commit 445b020 into gajus:master Jan 31, 2021
@brettz9 brettz9 deleted the executor-resolves branch January 31, 2021 09:41
@gajus
Copy link
Owner

gajus commented Jan 31, 2021

🎉 This PR is included in version 31.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@gajus gajus added the released label Jan 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Examine Promise executor for undefined resolve value (including when used in async functions)
2 participants