You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This rule would not advertise fixes, because async functions automagically catch sync exceptions and convert them to rejected promises. Removing the async modifier during fixing could change the runtime behavior of the function.
The text was updated successfully, but these errors were encountered:
Because of the implicit catching of sync exceptions in async functions, there's actually no way to detect if the async modifier is unnecessary. Ergo this rule does not prevent any programmer error but will lead to a lot of confusion as the runtime behavior changes.
That said and given the arguments in eslint/eslint#10000 I'm not convinced this rule needs to be part of the core library.
This rule requires at least one
await
expression in the function body.@AlCalzone suggested such a rule in microsoft/TypeScript#22024
This rule would not advertise fixes, because async functions automagically catch sync exceptions and convert them to rejected promises. Removing the
async
modifier during fixing could change the runtime behavior of the function.The text was updated successfully, but these errors were encountered: