Skip to content

[no-misused-promises] false positives with overloaded function #4609

Closed
@AviVahl

Description

@AviVahl
  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

Expected Result

mocha's it accepts a return promise in its callback type, so there should be no error.

Actual Result

typescript-eslint-bug/test/some-test.spec.ts
  2:32  error  Promise returned in function argument where a void return was expected  @typescript-eslint/no-misused-promises

mishandling of overloads defined on an interface?

Versions

package version
@typescript-eslint/eslint-plugin 5.13.0
@typescript-eslint/parser 5.13.0
TypeScript 4.5.5
ESLint 8.10.0
node 16.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't workingpackage: 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