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 does not seem to detect await statement in loops #3456

Closed
alisnic opened this issue May 28, 2024 · 1 comment · Fixed by #3457
Closed

require-await does not seem to detect await statement in loops #3456

alisnic opened this issue May 28, 2024 · 1 comment · Fixed by #3457
Assignees
Labels
C-bug Category - Bug

Comments

@alisnic
Copy link

alisnic commented May 28, 2024

  × eslint(require-await): Async function has no 'await' expression.
    ╭─[imports/some/redacted/path/uploadPostMultiImage.ts:3:37]
  2 │
  3 │ ╭─▶ export const uploadPostMultiImage = async (
  4 │ │     imageUrls: string[],
  5 │ │     owner: string,
  6 │ │     accessToken: string
  7 │ │   ): Promise<string[]> => {
  8 │ │     const results = [];
  9 │ │
 10 │ │     for (const url of imageUrls) {
 11 │ │       results.push(await uploadPostImage(url, owner, accessToken));
 12 │ │     }
 13 │ │
 14 │ │     return results;
 15 │ ╰─▶ };
    ╰────
@rzvxa
Copy link
Contributor

rzvxa commented May 28, 2024

Thanks for reporting this issue❤️

@rzvxa rzvxa closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category - Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants