Skip to content

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

@alisnic

Description

@alisnic
  × 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 │ ╰─▶ };
    ╰────

Metadata

Metadata

Assignees

Labels

C-bugCategory - Bug

Type

No type

Priority

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions