Skip to content

Commit 12e8fc7

Browse files
committed
add typecheck as npm cmd, pre-commit hook and ci check
1 parent 8754ab6 commit 12e8fc7

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

.githooks/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ set -e
44
set -o pipefail
55

66
npm run lint
7+
npm run typecheck

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ jobs:
1111
registry-url: 'https://registry.npmjs.org'
1212
- run: npm install
1313
- run: npm run lint
14+
- run: npm run typecheck
1415
- run: npm run test

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"build:esm": "tsc --project tsconfig.esnext.json",
1212
"lint": "eslint --ext js,ts,tsx src",
1313
"lint:fix": "npm run lint -- --fix",
14+
"typecheck": "tsc --noEmit",
1415
"test": "jest --verbose --passWithNoTests",
1516
"prepare": "npm run build",
1617
"prepublishOnly": "npm run test && npm run lint",

0 commit comments

Comments
 (0)