Skip to content
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

fix: remove composite: true from tsconfigs #635

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

haoqunjiang
Copy link
Member

@haoqunjiang haoqunjiang commented Dec 12, 2024

Description

We are only using references in a solution-style tsconfig. According to discussions at microsoft/TypeScript#60465, such usage doesn't require composite: true to be set in sub-configs.

Removing this field loosens the constraints on these configs that all checked files to be explicitly listed in files or includes.

After this change, type errors in source code would only be reported twice if they're also imported by unit test specs, in contrast to always be reported twice prior to the change.
I know this is not ideal yet, but it's still an improvement, and might help catch some edge cases such as #437 (comment)

In the long run, we should still keep an eye on #549 (pending vuejs/language-tools#4750). Cross-referencing might be a more intuitive configuration, and should be the desirable configuration if we opt into Vitest Browser Mode.

We are only using `references` in a solution-style tsconfig.
According to discussions at microsoft/TypeScript#60465,
such usage doesn't require `composite: true` to be set in sub-configs.

Removing this field loosens the constraints on these configs that all
files to be explicitly listed in `files` or `includes`.

After this change, type errors in source code would only be reported
twice if they're also imported by unit test specs, in contrast to
always be reported twice prior to the change.
I know this is not ideal yet, but it's still an improvement, and might
help catch some edge cases such as vuejs#437 (comment)

In the long run, we should still keep an eye on vuejs#549
(pending vuejs/language-tools#4750).
Cross-referencing might be a more intuitive configuration, and should be
the desirable configuration if we opt into Vitest Browser Mode.
@haoqunjiang haoqunjiang merged commit 24fc23b into vuejs:main Dec 12, 2024
101 checks passed
@haoqunjiang haoqunjiang deleted the remove-composite branch December 12, 2024 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants