Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: remove composite: true from tsconfigs
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 #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.
  • Loading branch information
haoqunjiang committed Dec 12, 2024
commit 3b7a7fc60fdd472a4da245d26021c378d45e9287
1 change: 0 additions & 1 deletion template/tsconfig/base/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",

"paths": {
Expand Down
1 change: 0 additions & 1 deletion template/tsconfig/base/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"playwright.config.*"
],
"compilerOptions": {
"composite": true,
"noEmit": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",

Expand Down
1 change: 0 additions & 1 deletion template/tsconfig/cypress-ct/tsconfig.cypress-ct.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
],
"exclude": [],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.cypress-ct.tsbuildinfo"
}
}
1 change: 0 additions & 1 deletion template/tsconfig/nightwatch-ct/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
"exclude": ["src/**/__tests__/*"],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",

"paths": {
Expand Down
1 change: 0 additions & 1 deletion template/tsconfig/nightwatch/nightwatch/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "@tsconfig/node22/tsconfig.json",
"compilerOptions": {
"composite": true,
"noEmit": true,
"tsBuildInfoFile": "../node_modules/.tmp/tsconfig.nightwatch.tsbuildinfo",

Expand Down
2 changes: 1 addition & 1 deletion template/tsconfig/vitest/tsconfig.vitest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "./tsconfig.app.json",
"include": ["src/**/__tests__/*", "env.d.ts"],
"exclude": [],
"compilerOptions": {
"composite": true,
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo",

"lib": [],
Expand Down
Loading