We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Is there a way to enforce that async functions do not return a promise? For example, I'd like to enforce we don't have code like this:
async function publishUser(user) { /// something async } async function publishAllUsers() { const users = await fetchUsersToPublish(); return Promise.all(users.map(publishUser)); }
in favor of this:
async function getUserDetails() { const users = await fetchUsersToPublish(); await Promise.all(users.map(publishUser)); }
The text was updated successfully, but these errors were encountered:
Did you mean return await here?
return await
Sorry, something went wrong.
Oops yes.
So looks like a version of https://typescript-eslint.io/rules/return-await/ .
No branches or pull requests
Is there a way to enforce that async functions do not return a promise? For example, I'd like to enforce we don't have code like this:
in favor of this:
The text was updated successfully, but these errors were encountered: