-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
[Feature Request] Add a few API for eslint-import-resolver-typescript
and eslint-plugin-import-x
to migrate to tsconfck
#183
Comments
Mostly the sheer difficulties of contributing to |
it might still be easier to add support for that in get-tsconfig (a little surprised it isn't supported yet) than bringing sync support to tsconfck. There is an old branch linked in the Discussion above but from what i remember it wasn't easy to have a single codebase that supports sync and async. And it probably got worse since then because of the changes around the cache. Happy to look into contributions that add sync support, but afraid that would require a major refactor to ensure keeping it lean and without duplicated logic. For the features around implementing a resolver or paths matcher, it is more difficult to justify adding them to tsconfck. I think they would better live in separate packages and shared between get-tsconfig, vite-tsconfig-paths etc. tsconfck focus is
what to do with the output is out of it's scope. |
closing this as out of scope, get-tsconfig gives you sync access until eslint allows you to work async and anything that is related to interpreting the outcome of tsconfig needs to be in a separate package. |
Still thanks for your awesome library! |
Describe the feature
I recently became the co-maintainer of the
eslint-import-resolver-typescript
and theeslint-plugin-import-x
projects, and I am working on replacingget-tsconfig
w/tsconfck
. I have faced a few difficulties in implementing that because of the lack of the following features:A Usecase
ESLint rules are synchronous, so we need a synchronous API to get the tsconfig file.
We also need a resolver that implements a module resolver interface that implements the TypeScript resolving algorithm (https://github.com/microsoft/TypeScript/blob/3ccbe804f850f40d228d3c875be952d94d39aa1d/src/compiler/moduleNameResolver.ts#L2465):
Alternatives
I could use libraries like synckit to force convert async API to sync, but it is less ideal.
As for the matcher/resolver, I could copy codes from vite-tsconfig-paths, which IMHO is also not ideal.
Additional context
The text was updated successfully, but these errors were encountered: