Skip to content

[require-await] require-await false positive  #1188

@mdouglass

Description

@mdouglass

Repro

{
  "parser": "@typescript-eslint/parser",
  "parserOptions": { "project": "./tsconfig.json" },
  "plugins": ["@typescript-eslint"],
  "rules": {
    "@typescript-eslint/require-await": "error"
  }
}
async function testFunction(): Promise<void> {
  await Promise.all([1, 2, 3].map(async value => Promise.resolve(value)))
}

Expected Result
No warnings/errors

Actual Result
1:1 error Async function 'testFunction' has no 'await' expression @typescript-eslint/require-await

Additional Info
Changing the function passed to map to value => value causes the false positive to not trigger.

Versions

package version
@typescript-eslint/eslint-plugin 2.6.1
@typescript-eslint/parser 2.6.1
TypeScript 3.7.2
ESLint 6.6.0
node 13.1.0
npm 6.12.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghas prthere is a PR raised to close thispackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions