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
Potentially incorrect documentation example for no-return-await #13656
Comments
Hi @cyberwombat, thanks for the issue! Examples of correct code do not aim to imply that it is a "valid usage". It's just a lint-free code for the rule. The Maybe we should add a comment above this example, to avoid confusion? |
@mdjermanovic I see. Yes I think a comment would be in order. I posted this as the result of a lengthy reddit discussion where we are wondering why eslint is saying they are not essentially the same. I'd recommend removing it from the "valid" section and adding it below with a mention that while it's incorrect eslint will not check it. What do you think? |
I made a docs PR #13657. It seemed a bit complicated to separate this example. We can't formulate that it's "incorrect" in general because the document also lists some use cases in favor of |
Great. sounds good! I'll let you close this - dunno if it needs to stay open for the PR. |
According to the docs: https://github.com/eslint/eslint/blob/master/docs/rules/no-return-await.md the following are not essentially equivalent.
Example of invalid usage:
Example of valid usage:
That makes no sense. Neither is proper usage. Is this a documentation bug or am I misunderstanding why it's there (stack trace is all I can think of)
The text was updated successfully, but these errors were encountered: