Currently there is rule that enfore no async if there is no await. This rule needs to be excluded and instead think of rule that will enforce asyn keyword when there is Promise being returned in function.
The reasons are:
you have to use Promise.resolve() / Promise.reject() if you want to simply exit of the function
throwing exception in non-async function will lead to unexpected behaviour
Currently there is rule that enfore no
async
if there is noawait
. This rule needs to be excluded and instead think of rule that will enforceasyn
keyword when there isPromise
being returned in function.The reasons are:
Promise.resolve()
/Promise.reject()
if you want to simply exit of the function