Skip to content

Commit aaee8ec

Browse files
Merge pull request #52 from the-collab-lab/add-typescript-check-ci-pipeline
Add script and pipeline checknvm install
2 parents 7fbda4a + fc3cc21 commit aaee8ec

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
lines changed

.github/workflows/typecheck.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Run TypeScript Checks on Every Commit and Pull Request
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: Run TypeScript Checks
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- run: npm ci
18+
- run: npm run typecheck

package-lock.json

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"jsdom": "^24.1.1",
2929
"lint-staged": "^15.2.8",
3030
"prettier": "^3.3.3",
31+
"typescript": "^5.6.2",
3132
"vite": "^5.3.5",
3233
"vite-plugin-pwa": "^0.20.1",
3334
"vite-plugin-svgr": "^4.2.0",
@@ -38,7 +39,8 @@
3839
"build": "vite build",
3940
"test": "vitest",
4041
"preview": "vite preview",
41-
"prepare": "husky"
42+
"prepare": "husky",
43+
"typecheck": "tsc -p tsconfig.json --noEmit"
4244
},
4345
"lint-staged": {
4446
"*.{js,jsx,ts,tsx}": [

tsconfig.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ESNext",
4+
"module": "ESNext",
5+
"moduleResolution": "node",
6+
"jsx": "react-jsx",
7+
"strict": true,
8+
"esModuleInterop": true,
9+
"skipLibCheck": true,
10+
"forceConsistentCasingInFileNames": true,
11+
"allowJs": true,
12+
"checkJs": false,
13+
"noEmit": true
14+
},
15+
"include": ["src/**/*"],
16+
"exclude": ["node_modules", "dist"]
17+
}

0 commit comments

Comments
 (0)