-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(eslint-plugin): [return-await] promote to recommended: strict #9595
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
feat(eslint-plugin): [return-await] promote to recommended: strict #9595
Conversation
Thanks for the PR, @JoshuaKGoldberg! 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. |
@@ -29,6 +29,7 @@ export default createRule({ | |||
meta: { | |||
docs: { | |||
description: 'Enforce consistent awaiting of returned promises', | |||
recommended: 'strict', |
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.
@kirkwaiblinger surfacing what you mentioned a bit back in a DM: that we might want to customize settings for this rule in the strict configs. I'm interpreting #8667 (comment) to mean that:
- For
strict
: we wantin-type-checked
, as it avoids stylistic things - For
stylistic
: that'd be a separate issue
...and since this already has defaultOptions: ['in-try-catch']
, we're cleared to just say recommended: 'strict'
. Is that right?
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.
negative - my understanding was that the only thing that we are currently proceeding with is putting return-await
in the strict
config with option error-handling-correctness-only
.
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.
Right! Makes sense, thanks.
Since that's a little bit more plumbing, as you suggested it would be, I'm going to close this one out & let you take lead. You've already taken the lead on so much around it & other async things, I'd rather not butt in.
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.
PR Checklist
return-await
instrict-type-checked
preset #8667Overview
Adds
return-await
to thestrict-type-checked
preset shared config.This is not a breaking change, as
strict
configs are explicitly allowed to be modified in minor versions. But targeting tov8
to be friendly.💖