Skip to content

Commit e7cf0bf

Browse files
committed
refactor: to typescript
we introduce the typescript plugin to rollup and convert the js files to typescript without any meaningful changes to the code
1 parent b504382 commit e7cf0bf

14 files changed

+442
-656
lines changed

.github/workflows/lint.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,27 @@ jobs:
4141
uses: pnpm/action-setup@v4
4242
- name: Install dependencies
4343
run: pnpm install
44-
- name: Lint JS files
44+
- name: Lint files
4545
run: pnpm run lint
46+
Typecheck:
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@v4
51+
- name: Setup Node
52+
uses: actions/setup-node@v4
53+
with:
54+
node-version: "20"
55+
- name: Restore node_modules cache
56+
uses: actions/cache@v4
57+
with:
58+
path: node_modules
59+
key: ${{ runner.os }}-node-modules-${{ hashFiles('package.json') }}
60+
restore-keys: |
61+
${{ runner.os }}-node-modules
62+
- name: Install pnpm
63+
uses: pnpm/action-setup@v4
64+
- name: Install dependencies
65+
run: pnpm install
66+
- name: Typecheck files
67+
run: pnpm run typecheck

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@
2929
"vitest": "^3.2.4"
3030
},
3131
"scripts": {
32+
"typecheck": "tsc --noEmit",
3233
"build": "vite build",
33-
"lint": "prettier --check 'src/**/*.js'",
34+
"lint": "prettier --check 'src/**/*'",
3435
"test": "vitest"
3536
},
3637
"packageManager": "[email protected]"

0 commit comments

Comments
 (0)