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

docs: update deprecation notice of no-return-await #18433

Merged
merged 3 commits into from May 8, 2024

Conversation

Tanujkanti4441
Copy link
Contributor

Prerequisites checklist

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

[x] 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
[ ] Other, please explain:

What changes did you make? (Give an overview)

update deprecation notice of no-return-await rule.

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

Fixes: #18166

@Tanujkanti4441 Tanujkanti4441 requested a review from a team as a code owner May 8, 2024 11:24
@eslint-github-bot eslint-github-bot bot added the documentation Relates to ESLint's documentation label May 8, 2024
Copy link

netlify bot commented May 8, 2024

Deploy Preview for docs-eslint ready!

Name Link
🔨 Latest commit d41d451
🔍 Latest deploy log https://app.netlify.com/sites/docs-eslint/deploys/663b755b723d1800083de12f
😎 Deploy Preview https://deploy-preview-18433--docs-eslint.netlify.app
📱 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.

@@ -7,7 +7,7 @@ further_reading:
- https://jakearchibald.com/2017/await-vs-return-vs-return-await/
---

This rule was **deprecated** in ESLint v8.46.0 with no replacement. The original intent of this rule no longer applies due to the fact JavaScript now handles native `Promises` differently. It can now be slower to remove `await` rather than keeping it. More technical information can be found in [this V8 blog entry](https://v8.dev/blog/fast-async).
This rule was **deprecated** in ESLint v8.46.0 with no replacement. The original intent of this rule no longer applies due to the fact JavaScript now handles native `Promises` differently. The purpose of the rule was to discourage developers from using `return await` with async functions due to the perceived cost of the extra microtask. However, with advancements in JavaScript engine optimizations, particularly in modern engine like V8, the noted cost of the extra microtask no longer exists. More technical information can be found in [this V8 blog entry](https://v8.dev/blog/fast-async).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This rule was **deprecated** in ESLint v8.46.0 with no replacement. The original intent of this rule no longer applies due to the fact JavaScript now handles native `Promises` differently. The purpose of the rule was to discourage developers from using `return await` with async functions due to the perceived cost of the extra microtask. However, with advancements in JavaScript engine optimizations, particularly in modern engine like V8, the noted cost of the extra microtask no longer exists. More technical information can be found in [this V8 blog entry](https://v8.dev/blog/fast-async).
This rule was **deprecated** in ESLint v8.46.0 with no replacement. The original intent of this rule was to discourage the use of `return await`, to avoid an extra microtask. However, due to the fact that JavaScript now handles native `Promises` differently, there is no longer an extra microtask. More technical information can be found in [this V8 blog entry](https://v8.dev/blog/fast-async).

I think the point is that there's no longer an extra microtask due to the change in JavaScript specification.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated!

@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 labels May 8, 2024
@github-actions github-actions bot removed the rule Relates to ESLint's core rules label May 8, 2024
@@ -7,7 +7,7 @@ further_reading:
- https://jakearchibald.com/2017/await-vs-return-vs-return-await/
---

This rule was **deprecated** in ESLint v8.46.0 with no replacement. The original intent of this rule no longer applies due to the fact JavaScript now handles native `Promises` differently. The purpose of the rule was to discourage developers from using `return await` with async functions due to the perceived cost of the extra microtask. However, with advancements in JavaScript engine optimizations, particularly in modern engine like V8, the noted cost of the extra microtask no longer exists. More technical information can be found in [this V8 blog entry](https://v8.dev/blog/fast-async).
This rule was **deprecated** in ESLint v8.46.0 with no replacement. The original intent of this rule was to discourage the use of `return await`, to avoid an extra microtask. However, due to the fact that JavaScript now handles native `Promises` differently, there is no longer an extra microtask. More technical information can be found in [this V8 blog entry](https://v8.dev/blog/fast-async).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
This rule was **deprecated** in ESLint v8.46.0 with no replacement. The original intent of this rule was to discourage the use of `return await`, to avoid an extra microtask. However, due to the fact that JavaScript now handles native `Promises` differently, there is no longer an extra microtask. More technical information can be found in [this V8 blog entry](https://v8.dev/blog/fast-async).
This rule was **deprecated** in ESLint v8.46.0 with no replacement. The original intent of this rule was to discourage the use of `return await`, to avoid an extra microtask. However, due to the fact that JavaScript now handles native `Promise`s differently, there is no longer an extra microtask. More technical information can be found in [this V8 blog entry](https://v8.dev/blog/fast-async).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

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! Leaving open for @fasttime to verify.

Copy link
Member

@fasttime fasttime 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!

@fasttime fasttime merged commit 04e7c6e into eslint:main May 8, 2024
20 checks passed
@Tanujkanti4441 Tanujkanti4441 deleted the update-notice branch May 8, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion documentation Relates to ESLint's documentation
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Docs: no-return-await deprecation notice leads to a wrong conclusion
3 participants