Skip to content

Commit 8d54f12

Browse files
committed
Make tsconfig.test.json responsible for running type tests during CI
1 parent 9676b8e commit 8d54f12

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

packages/toolkit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
"lint": "eslint src examples",
104104
"test": "vitest --run --typecheck",
105105
"test:watch": "vitest --watch",
106-
"type-tests": "yarn tsc -p tsconfig.json",
106+
"type-tests": "yarn tsc -p tsconfig.test.json --noEmit",
107107
"prepack": "yarn build"
108108
},
109109
"files": [

packages/toolkit/tsconfig.build.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
// For building the library.
23
"extends": "./tsconfig.base.json",
34
"compilerOptions": {
45
"outDir": "dist"

packages/toolkit/tsconfig.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
2+
// For general development and intellisense.
3+
// Scans the entire source code against the current TS version
4+
// we are using during development.
25
"extends": "./tsconfig.test.json",
36
"compilerOptions": {
4-
"skipLibCheck": true
5-
}
7+
"skipLibCheck": true,
8+
"rootDir": "."
9+
},
10+
"include": ["."]
611
}

packages/toolkit/tsconfig.test.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
{
2+
// For runtime and type tests during CI.
23
"extends": "./tsconfig.base.json",
34
"compilerOptions": {
45
"emitDeclarationOnly": false,
56
"noEmit": true,
6-
"rootDir": ".",
7+
"rootDir": "./src",
78
"jsx": "react-jsx",
8-
"skipLibCheck": false,
9+
"skipLibCheck": true,
910
"noImplicitReturns": false
1011
},
11-
"exclude": ["dist"]
12+
"exclude": ["dist"],
13+
"include": [
14+
"src/**/*.test.ts*",
15+
"src/**/*.test-d.ts*",
16+
"src/**/*.spec.ts*",
17+
"src/**/tests/*",
18+
"src/**/*.typetest.ts*"
19+
]
1220
}

0 commit comments

Comments
 (0)