Content-Length: 300295 | pFad | https://github.com/typescript-eslint/typescript-eslint/issues/4609

14 [no-misused-promises] false positives with overloaded function · Issue #4609 · typescript-eslint/typescript-eslint · GitHub
Skip to content

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

@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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/typescript-eslint/typescript-eslint/issues/4609

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy