Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: clarify promise-function-async docs #9289

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

Closed
wants to merge 2 commits into from

Conversation

benmccann
Copy link
Contributor

PR Checklist

Overview

Reword the description much more simply

Fix an ungrammatical phrase in the callout that was hard to parse - "make the return type explicitly to allow the rule to pass"

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @benmccann!

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 Jun 6, 2024

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit ed4df0b
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/666135dbd6c931000854df58
😎 Deploy Preview https://deploy-preview-9289--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: 92 (🔴 down 7 from production)
Accessibility: 100 (no change from production)
Best Practices: 92 (no change from production)
SEO: 90 (🔴 down 8 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.

Copy link

nx-cloud bot commented Jun 6, 2024

Copy link
Contributor

@StyleShit StyleShit left a comment

Choose a reason for hiding this comment

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

Sounds much better IMO 😄

@@ -9,16 +9,9 @@ import TabItem from '@theme/TabItem';
>
> See **https://typescript-eslint.io/rules/promise-function-async** for documentation.

Ensures that each function is only capable of:
Ensures that functions returning promises can only return rejected promises when an error is encountered and cannot throw. This simplifies the API for callers by making it so that they only need to handle errors in a single manner.
Copy link
Member

Choose a reason for hiding this comment

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

🤔 I don't think this is better at explaining the rule. At its core, promise-function-async enforces that "any function or method that returns a Promise to be marked async". This explanation is a rewording of the technical backing but both are pretty in-the-weeds.

I think I'd rather take this on myself as part of #8088 actually. Unless @kirkwaiblinger do you have specific wording you wanted to work with?

Copy link
Member

Choose a reason for hiding this comment

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

I agree that this is in need of more significant overhaul from a team member 👍

@JoshuaKGoldberg JoshuaKGoldberg marked this pull request as draft June 17, 2024 19:02
@kirkwaiblinger
Copy link
Member

Hey @benmccann! 👋

We appreciate the suggestions and grammar fixup! I'm going to close this PR in light of #9289 (comment), but, to be clear, that doesn't indicate that there's anything inadequate with your suggestions! It's just that in this case, they'll be superseded by some existing, ongoing efforts around improving our promise rule docs to be more cohesive as a whole.

Thanks for the PR and discussions! 🙂

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 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.

4 participants