This repository illustrates a false positive of the typescript-eslint's rule no-base-to-string.
It uses types from discord.js
Install dependencies : pnpm install or npm install.
Simply run linting on repository : npm run lint.
Type of variable channel is TextChannel, which has a correct .toString method. The type of variable channel has been checked by debugging the typescript-eslint rule, using checker.typeToString.
Other debugging shows that parent expression, channel.toString, is of type
(() => `<#${string}>`) & (() => string)For clarification purpose, .toString is directly called, but done under the hood by JavaScript, and TypeScript & typescript-eslint understand that, so the result is the same.
Cannot explain why this false positive exists.