-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Closed
Copy link
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
Description
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.
Playground Link
Repro Code
class Boom<T> extends Error {
details: T;
}
function bar<T>(error: Boom<T>) {
console.log(error.toString());
}ESLint Config
module.exports = {
parser: "@typescript-eslint/parser",
rules: {
"@typescript-eslint/no-base-to-string": "error,
},
};tsconfig
Expected Result
Since no-base-to-string checks whether a plain class's supertypes are ignored (see #11520), I expect it to also check whether a generic class's supertypes are ignored.
Actual Result
'error' will use Object's default stringification format ('[object Object]') when stringified. 12:15 - 12:20
Additional Info
No response
Metadata
Metadata
Assignees
Labels
accepting prsGo ahead, send a pull request that resolves this issueGo ahead, send a pull request that resolves this issuebugSomething isn't workingSomething isn't workingpackage: eslint-pluginIssues related to @typescript-eslint/eslint-pluginIssues related to @typescript-eslint/eslint-plugin
{ "compilerOptions": { "strictNullChecks": true } }