Skip to content

Commit

Permalink
fix(scaffolding): allow TS Server to see Vitest globals on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jkomyno committed Sep 16, 2024
1 parent 24d3247 commit c9bf222
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 12 deletions.
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"build": "turbo run build",
"clean": "turbo run clean",
"watch": "turbo run watch",
"prettier-check": "turbo run prettier-check",
"prettier-write": "turbo run prettier-write",
"typecheck": "turbo run typecheck",
"lint:ci": "turbo run lint:ci",
"lint": "turbo run lint",
"test": "pnpm -r --if-present test",
Expand Down
4 changes: 2 additions & 2 deletions packages/common-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"scripts": {
"clean": "rimraf build",
"build": "pnpm clean && tsc",
"typecheck": "tsc",
"prebuild": "pnpm clean",
"build": "tsc --build tsconfig.build.json",
"lint:ci": "biome ci",
"lint": "biome check --fix --unsafe",
"test": "vitest --workspace ../../vitest.workspace.ts run",
Expand Down
7 changes: 7 additions & 0 deletions packages/common-utils/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.base.node.json",
"include": ["src"],
"compilerOptions": {
"outDir": "build"
}
}
2 changes: 1 addition & 1 deletion packages/common-utils/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "../../tsconfig.base.node.json",
"include": ["src"],
"include": ["src", "__tests__"],
"compilerOptions": {
"outDir": "build"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"main": "./build/index.js",
"scripts": {
"clean": "rimraf build",
"build": "pnpm clean && tsc",
"typecheck": "tsc",
"prebuild": "pnpm clean",
"build": "tsc --build tsconfig.build.json",
"lint:ci": "biome ci",
"lint": "biome check --fix --unsafe",
"test:unit": "vitest --workspace ../../vitest.workspace.ts --project unit run"
Expand Down
7 changes: 7 additions & 0 deletions packages/example/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "../../tsconfig.base.node.json",
"include": ["src"],
"compilerOptions": {
"outDir": "build"
}
}
2 changes: 1 addition & 1 deletion packages/example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "../../tsconfig.base.node.json",
"include": ["src"],
"include": ["src", "__tests__"],
"compilerOptions": {
"outDir": "build"
}
Expand Down
3 changes: 0 additions & 3 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"app#watch": {
"dependsOn": ["^build"]
},
"typecheck": {
"dependsOn": ["^typecheck"]
},
"lint:ci": {},
"lint": {},
"clean": {
Expand Down

0 comments on commit c9bf222

Please sign in to comment.