-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Bug(typescript-estree): Project services default project not working with extended tsconfigs #9205
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
Comments
Retested with v8. (1) is still present but (2) appears fixed as of alpha.24. https://github.com/higherorderfunctor/example-typescript-eslint-bug/tree/rc-v8
|
Wow! Great investigation + report, thanks a million @higherorderfunctor! Are you up for sending a PR? 😁 Confirmed that (1) is a bug we should have fixed. I like the |
@JoshuaKGoldberg might take a few days, but if nobody else gets to it by the end of the week I can work the PR. Thanks for confirming! |
Does your patch solve your first issue for #8835 ? EDIT: Nevermind. Just tested and it doesn't. |
Reducing scope to what the PR will solve. The |
Closed by #9306. |
Before You File a Bug Report Please Confirm You Have Done The Following...
Issue Description
I have identified two issues with project services.
tsconfig.json
has anextends
, to say atsconfig.base.json
with a common set of compiler options, those compiler options are not used. The example repo is a monorepo with liberal use of project references. An example published package that uses a similar setup is https://github.com/Effect-TS/effect.parserOptions.extraFileExtensions
is not working as expected to setuptsserver
for type checking using project references with non-standard file extensions. The example demonstrates how.vue
files are not type checking correctly.I have created a basic patch that solves both issues (minus rigorous testing).
The first issue is triggered by
tsserver.readConfigFile
attypescript-eslint/packages/typescript-estree/src/create-program/createProjectService.ts
Line 74 in 5ca7f6e
Replacing with
tsserver.getParsedCommandLineOfConfigFile
solves the extends issue. This was pretty much lifted fromtypescript-eslint/packages/typescript-estree/src/create-program/useProvidedPrograms.ts
Line 66 in 5ca7f6e
Fixing this issue will reveal the second issue with file extensions. The patch corrects this by forwarding
extraFileExtensions
totsserver
usingservice.setHostConfiguration
.Reproduction Repository Link
https://github.com/higherorderfunctor/example-typescript-eslint-bug
Repro Steps
Directions are located in the example repo's README.
The repo has a patch to fix the bugs (enabled by default) and needs to disabled to demonstrate the bugs.
Versions
The text was updated successfully, but these errors were encountered: