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
no-async-fn-without-await errors when await is last call #147
Comments
That should not be an error. Sounds like a bug. |
I agree, that sounds like a bug (though obviously, you could return the Promise directly). @ekmartin I tried adding your example in my tests and was expecting tests to fail, but I could not reproduce. Does that code excerpt (along with the require of |
It does indeed @jfmengels: import test from 'ava';
const something = () => null;
test.after(async () => {
await something();
}); Using the newest release of xo (0.17), with |
Is this because the test could just return the promise explicitly instead? If so maybe it would be better to split it into its own rule, it's kind of confusing at the moment.
The text was updated successfully, but these errors were encountered: