-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dev): Add placeholder tsconfigs for tests (#5200)
It is well-documented (see 1-6 below) that VSCode doesn't support setups like ours, where multiple tsconfig files coexist in a single directory. Strangely, though, it is only recently that this has become a problem, with VSCode at random intervals forgetting that it's ever heard of `expect` or `describe` (because it's not seeing `tsconfig.test.json`, but taking a while to realize it). There is an open issue[7] tracking the addition of support for this, but it's been open for a long time, with little movement. In the meantime, this solves the problem by adding placeholder `test/tsconfig.json` files to each package, each pointing to its corresponding `tsconfig.test.ts` file. I went with this approach over simply moving and renaming the existing test tsconfigs because this allows us to stay consistent in having all flavors of tsconfig for a package live at the package root level, and provides an easy way to reverse this workaround, should VSCode ever fix the underlying problem. [1] angular/angular-cli#5175 [2] microsoft/TypeScript#49210 [3] microsoft/vscode#107750 [4] microsoft/vscode#12463 [5] sillsdev/bible-karaoke#175 [6] microsoft/TypeScript#8435 [7] microsoft/TypeScript#33094
- Loading branch information
1 parent
453b7ad
commit d48f6fd
Showing
17 changed files
with
133 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
# `tsconfig` Templates | ||
|
||
Every package should get its own copy of these three files. Package-specific options should go in `tsconfig.json` and | ||
test-specific options in `tsconfig.test.json`. The `types` file shouldn't need to be modified, and only exists because | ||
tsconfigs don't support multiple inheritence. | ||
Every package should get its own copy of the three files in this directory and the one in `test/` (which should go in an | ||
analogous spot in the package). Package-specific options should go in `tsconfig.json` and test-specific options in | ||
`tsconfig.test.json`. The `types` file shouldn't need to be modified, and only exists because tsconfigs don't support | ||
multiple inheritence. The same goes for the file in `test/`, which only exists because VSCode only knows to look for a | ||
file named (exactly) `tsconfig.json`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// TODO Once https://github.com/microsoft/TypeScript/issues/33094 is done (if it ever is), this file can disappear, as | ||
// it's purely a placeholder to satisfy VSCode. | ||
|
||
{ | ||
"extends": "../tsconfig.test.json", | ||
|
||
"include": ["./**/*"] | ||
} |