-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v2.21 recursion error at import
statement
#1816
Comments
import
statementimport
statement
What's your tsconfig look like? |
@ljharb it's a lerna repo with multiple packages that extend a shared base config: package1/tsconfig.json: {
"extends": "../tsconfig.base.json",
"include": ["src/**/*"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
"outDir": "dist"
},
"references": [
{
"path": "../package2"
}
]
} package2/tsconfig.json: {
"extends": "../tsconfig.base.json",
"include": ["src/**/*"],
"compilerOptions": {
"composite": true,
"rootDir": "src",
"outDir": "dist"
}
} tsconfig.base.json: {
"compilerOptions": {
"composite": true,
"target": "es2019",
"module": "commonjs",
"sourceMap": true,
"lib": [
"dom",
"es7",
"esnext.asynciterable"
],
"declaration": true,
"declarationMap": true,
"removeComments": false,
"strict": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"alwaysStrict": true,
"noUnusedLocals": true,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": true,
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"@foo/*": ["./*/src"],
"*": ["../node_modules/*", "../typelibs/*.d.ts"]
},
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"sourceRoot": "src",
"extendedDiagnostics": true
}
} |
tbh it kind of sounds like |
Note that this is not really a The problem could be fixed in this plugin by resolving the Alternatively:
(see also typescript-eslint/typescript-eslint#251 for further context) |
That sounds like a reasonable fix here to account for tsconfig-loader’s limitation. Want to make a PR? |
I'd love to make a PR to fix it because I'm having the same issue with However, as I looked further into typescript-eslint/typescript-eslint#251, it seems there is no way to use purely relative path for That said, it would be great if I can get some pointers on where to report/throw errors in |
That error sounds like a great idea. I don't have an opinion on where the error should be thrown, anywhere's probably good :-) |
v2.20.2 works as expected
v2.21.2 pins the process at 100% CPU, then throws a call stack exceeded error after ~90s:
In case it helps, the reported line that it fails at (
foo.ts:5
) imports a default class export:which is exported as:
Let me know what additional info I can provide. Thanks!
Edit: v2.21.1 has the same issue
The text was updated successfully, but these errors were encountered: