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

feat: deprecate no-return-await #17417

Merged
merged 4 commits into from Jul 26, 2023

Conversation

clshortfuse
Copy link
Contributor

The original intent of this rule no longer applies due to the fact Javascript now handles native Promises differently. It can no be slower to remove await rather than keeping it.

Fixes #17345

Prerequisites checklist

What is the purpose of this pull request? (put an "X" next to an item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofix to a rule
[ ] Add a CLI option
[] Add something to the core
[x] Other, please explain:

Deprecate no-return-await.

What changes did you make? (Give an overview)

Is there anything you'd like reviewers to focus on?

The original intent of this rule no longer applies due to the fact Javascript now handles native `Promises` differently. It can no be slower to remove `await` rather than keeping it.

Fixes eslint#17345
@clshortfuse clshortfuse requested a review from a team as a code owner July 25, 2023 15:08
@eslint-github-bot eslint-github-bot bot added the bug ESLint is working incorrectly label Jul 25, 2023
@netlify
Copy link

netlify bot commented Jul 25, 2023

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit 2358a4b
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/64c136daf71ff900081d4de4
😎 Deploy Preview https://deploy-preview-17417--docs-eslint.netlify.app/rules/no-return-await
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@mdjermanovic mdjermanovic changed the title fix: deprecate no-return-await feat: deprecate no-return-await Jul 25, 2023
@mdjermanovic mdjermanovic added rule Relates to ESLint's core rules accepted There is consensus among the team that this change meets the criteria for inclusion feature This change adds a new feature to ESLint deprecation This change deprecates an existing feature and removed bug ESLint is working incorrectly labels Jul 25, 2023
clshortfuse and others added 2 commits July 25, 2023 19:05
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Co-authored-by: Milos Djermanovic <milos.djermanovic@gmail.com>
Copy link
Member

@mdjermanovic mdjermanovic left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Would like @nzakas to verify before merging.

Copy link
Member

@nzakas nzakas left a comment

Choose a reason for hiding this comment

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

LGTM. Just cleaned up a bit of the docs.

docs/src/rules/no-return-await.md Outdated Show resolved Hide resolved
@nzakas nzakas merged commit 853d32b into eslint:main Jul 26, 2023
22 checks passed
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Jan 23, 2024
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jan 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion contributor pool deprecation This change deprecates an existing feature feature This change adds a new feature to ESLint rule Relates to ESLint's core rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rule Change: return await is both faster and allows better error handling
3 participants