Skip to content

Commit a183f3c

Browse files
jeffwidmantruggeri
andauthored
Add typecheck step to CI (#685)
Add a "typecheck" script (tsc --noEmit) to package.json and run it in CI before lint and test. This catches TypeScript type errors that esbuild silently ignores during bundling. Co-authored-by: Thomas Ruggeri <truggeri@github.com>
1 parent 5e17564 commit a183f3c

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222

2323
- run: npm ci
2424

25+
- run: npm run typecheck
26+
2527
- run: npm run lint
2628

2729
- run: npm test

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "dist/index.js",
66
"scripts": {
77
"build": "esbuild src/main.ts --bundle --platform=node --target=node24 --outfile=dist/index.js --format=cjs --legal-comments=none",
8+
"typecheck": "tsc --noEmit",
89
"lint": "eslint . --ext .ts",
910
"test": "jest",
1011
"dry-run": "esbuild src/dry-run.ts --bundle --platform=node --target=node24 --format=cjs --outfile=dist/dry-run.js --log-level=warning && node dist/dry-run.js"

0 commit comments

Comments
 (0)