Skip to content

Bug: [@typescript-eslint/no-base-to-string] False positive on * import containing toString function with overloads #11945

@bschlenk

Description

@bschlenk

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Issue Description

If you * import everything from a module, and that module contains a toString method that has function overloads, then the @typescript-eslint/no-base-to-string rule incorrectly reports that the toString call is going to use the default implementation.

The function overloads appear to be an important part of the repro. Without them the rule doesn't report anything.

Reproduction Repository Link

https://github.com/bschlenk/no-base-to-string-repro

Repro Steps

  1. clone the repo
  2. pnpm install
  3. pnpm lint

Versions

package version
typescript-eslint 8.52.0
TypeScript 5.9.3
ESLint 9.39.2
node 22.17.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions