Skip to content
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 rule creates unresolvable error #12

Closed
EdJoPaTo opened this issue Aug 11, 2019 · 2 comments
Closed

require-await rule creates unresolvable error #12

EdJoPaTo opened this issue Aug 11, 2019 · 2 comments

Comments

@EdJoPaTo
Copy link

2a6857d introduces a problem:
Either way I fix the rule, the other denies the code:

const results = await Promise.all(
	queries.map(await o => search(o))
);

Errors:

  • Functions that return promises must be async. @typescript-eslint/promise-function-async
  • Async arrow function has no await expression. @typescript-eslint/require-await

I personally prefer to have the async at the arrow function as it directly shows 'this returns a promise, it has to be dealt with'.

@sindresorhus
Copy link
Member

I think this will fix it: typescript-eslint/typescript-eslint#826

@EdJoPaTo
Copy link
Author

EdJoPaTo commented Sep 28, 2019

The PR is in master but it is definitely not fine. I had no time to add PRs to the eslint Repo about what specifically does not work. But there are multiple different things not working.
I disabled the rule entirely for now as it has too many false positives.

Edit: overlooked 7e65f8a
Im on the same Page there!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants