-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Bug: [return-await] Gives false positive with unknown values #9903
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
Comments
TBH my opinion is that we should just remove entirely the check for typescript-eslint/packages/eslint-plugin/src/rules/return-await.ts Lines 290 to 305 in 88a8673
typescript-eslint/packages/eslint-plugin/src/rules/await-thenable.ts Lines 37 to 64 in 584db29
@typescript-eslint/triage-team Thoughts? Otherwise we can of course just sync the logic with |
Agreed, though that feels like a breaking change either way. 😬 |
Eh. It feels like it doesn't quite technically satisfy any of the requirements in https://typescript-eslint.io/users/versioning#eslint-plugin. But, it is quietly documented on the rule page by example only ( It sounds like between the choices of
we are going to go with Option 1. |
Uh oh!
There was an error while loading. Please reload this page.
Before You File a Bug Report Please Confirm You Have Done The Following...
Playground Link
link
Repro Code
ESLint Config
Expected Result
Since
unknownParam
could be a Promise (we don't know), the correct code isreturn await unknownParam
, so that thefinally
block will execute after the promise completes, not before.Actual Result
The rule does not allow that, and forces you to write incorrect code.
The text was updated successfully, but these errors were encountered: