Skip to content

Commit 65a78df

Browse files
mokagioclaude
andauthored
Include scripts in typecheck (#2928)
The `scripts/` directory was excluded from type checking entirely. Add a dedicated `scripts/tsconfig.json` and run it as part of `npm run typecheck`. Also add `scripts/**/*` to the root `tsconfig.json` for IDE coverage. A root `tsconfig.json` change alone would not make `npm run typecheck` validate `scripts/`. The previous root `typecheck` command only ran workspace checks, and `scripts/` is not a workspace. Using the root `tsconfig.json` directly for CI is also not viable yet because it still surfaces pre-existing `import.meta` errors from `apps/cli`, which has its own tsconfig with the correct module settings. This means the dedicated `scripts/tsconfig.json` and the `package.json` update are the functional part of the fix, while the root `tsconfig.json` include improves IDE coverage. --- Generated with the help of Claude Code, https://claude.ai/code Co-Authored-By: Claude Code Opus 4.6 <noreply@anthropic.com>
1 parent df41da2 commit 65a78df

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"app:install:bundle": "npm -w studio-app run install:bundle",
4747
"compare:perf": "npm -w compare-perf run compare",
4848
"lint": "eslint {apps/cli,apps/studio/src,apps/studio/e2e,tools/common}",
49-
"typecheck": "npm run typecheck --workspaces --if-present",
49+
"typecheck": "npm run typecheck --workspaces --if-present && tsc -p scripts/tsconfig.json --noEmit",
5050
"format": "npm run lint -- --fix",
5151
"test": "vitest run",
5252
"test:watch": "vitest",

scripts/tsconfig.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"extends": "../tsconfig.base.json",
3+
"compilerOptions": {
4+
"baseUrl": "..",
5+
"paths": {
6+
"*": [ "node_modules/*" ],
7+
"@studio/common/*": [ "tools/common/*" ]
8+
}
9+
},
10+
"include": [ "**/*" ],
11+
"exclude": [ "**/node_modules/**/*" ]
12+
}

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"apps/studio/e2e/**/*",
1717
"apps/cli/**/*",
1818
"tools/common/**/*",
19-
"./vitest.global-setup.ts"
19+
"./vitest.global-setup.ts",
20+
"scripts/**/*"
2021
],
2122
"exclude": [ "**/__mocks__/**/*", "**/node_modules/**/*", "**/dist/**/*", "**/out/**/*" ]
2223
}

0 commit comments

Comments
 (0)