-
Notifications
You must be signed in to change notification settings - Fork 2
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
require-await and no-return-await rules are incompatible #3
Comments
so |
It would prevent to do an async one line arrow function, but in this case why forbidding return await? According to the explanations of the rule (https://eslint.org/docs/rules/no-return-await), the goal is to avoid an unnecessary micro task but if we decompose we have it. |
something like |
In a one line arrow function the return is implicit and eslint considers there is one. Your syntax is not correct since you use await in a non async function, but |
I see now. Thank you :) |
As pointed out in this issue if we have both
require-await
andno-return-await
rules turned on, when the only call to an async function is on the return statement we get an error whatever we use await or not.We should disable at least one these rules.
The text was updated successfully, but these errors were encountered: