Skip to content

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

Conversation

JoshuaKGoldberg
Copy link
Member

PR Checklist

Overview

Adds return-await to the strict-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 to v8 to be friendly.

💖

@typescript-eslint
Copy link
Contributor

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.

Copy link

netlify bot commented Jul 19, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit e450e75
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/669a8250dd08c00008056750
😎 Deploy Preview https://deploy-preview-9595--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🟢 up 5 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 90 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@JoshuaKGoldberg JoshuaKGoldberg requested review from kirkwaiblinger and a team July 19, 2024 15:20
@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as ready for review July 19, 2024 15:20
@@ -29,6 +29,7 @@ export default createRule({
meta: {
docs: {
description: 'Enforce consistent awaiting of returned promises',
recommended: 'strict',
Copy link
Member Author

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 want in-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?

Copy link
Member

@kirkwaiblinger kirkwaiblinger Jul 19, 2024

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.

Copy link
Member Author

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.

Copy link
Member

@kirkwaiblinger kirkwaiblinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as draft July 19, 2024 21:54
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants