-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Conversation
✅ Deploy Preview for docs-eslint ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
docs/src/rules/no-return-await.md
Outdated
@@ -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). |
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.
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.
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.
Updated!
docs/src/rules/no-return-await.md
Outdated
@@ -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). |
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.
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). |
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.
Done!
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.
LGTM, thanks! Leaving open for @fasttime to verify.
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.
LGTM, thanks!
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