Skip to content

Commit cb384ce

Browse files
committed
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 constrast 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.
1 parent fb5d851 commit cb384ce

File tree

6 files changed

+1
-6
lines changed

6 files changed

+1
-6
lines changed

template/tsconfig/base/tsconfig.app.json

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
44
"exclude": ["src/**/__tests__/*"],
55
"compilerOptions": {
6-
"composite": true,
76
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
87

98
"paths": {

template/tsconfig/base/tsconfig.node.json

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"playwright.config.*"
99
],
1010
"compilerOptions": {
11-
"composite": true,
1211
"noEmit": true,
1312
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
1413

template/tsconfig/cypress-ct/tsconfig.cypress-ct.json

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
],
1010
"exclude": [],
1111
"compilerOptions": {
12-
"composite": true,
1312
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.cypress-ct.tsbuildinfo"
1413
}
1514
}

template/tsconfig/nightwatch-ct/tsconfig.app.json

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"include": ["env.d.ts", "src/**/*", "src/**/*.vue"],
44
"exclude": ["src/**/__tests__/*"],
55
"compilerOptions": {
6-
"composite": true,
76
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
87

98
"paths": {

template/tsconfig/nightwatch/nightwatch/tsconfig.json

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"extends": "@tsconfig/node22/tsconfig.json",
33
"compilerOptions": {
4-
"composite": true,
54
"noEmit": true,
65
"tsBuildInfoFile": "../node_modules/.tmp/tsconfig.nightwatch.tsbuildinfo",
76

template/tsconfig/vitest/tsconfig.vitest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"extends": "./tsconfig.app.json",
3+
"include": ["src/**/__tests__/*", "env.d.ts"],
34
"exclude": [],
45
"compilerOptions": {
5-
"composite": true,
66
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.vitest.tsbuildinfo",
77

88
"lib": [],

0 commit comments

Comments
 (0)