Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
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 havesearched for related issues and found none that matched my issue.
- I haveread the FAQ and my problem is not listed.
Playground Link
Repro Code
exporttypeValue=|undefined|boolean|number|string|Date|Uint8Array|Value[]|Struct;exporttypeStruct={[key:string]:Value};functionfoo(v:Value){console.log(`Hi${v}`);// causes rule to crash}
ESLint Config
module.exports={parser:"@typescript-eslint/parser",rules:{"@typescript-eslint/no-base-to-string":"error"},};
tsconfig
{"compilerOptions": {"strictNullChecks":true }}Expected Result
No crash
Actual Result
Rule crashes with stack trace like this:
RangeError: Maximum call stack size exceededOccurred while linting ...Rule: "@typescript-eslint/no-base-to-string" at getNameOfSymbolAsWritten (.../node_modules/typescript/lib/typescript.js:59075:36) at createAccessFromSymbolChain (.../node_modules/typescript/lib/typescript.js:56976:25) at symbolToTypeNode (.../node_modules/typescript/lib/typescript.js:56953:26) at typeToTypeNodeWorker (.../node_modules/typescript/lib/typescript.js:55397:16) at typeToTypeNodeHelper (.../node_modules/typescript/lib/typescript.js:55247:24) at mapToTypeNodes (.../node_modules/typescript/lib/typescript.js:56233:28) at typeReferenceToTypeNode (.../node_modules/typescript/lib/typescript.js:55913:33) at visitAndTransformType (.../node_modules/typescript/lib/typescript.js:55733:24) at typeToTypeNodeWorker (.../node_modules/typescript/lib/typescript.js:55402:28) at typeToTypeNodeHelper (.../node_modules/typescript/lib/typescript.js:55247:24)Additional Info
No response