Skip to content

Commit 2cc31fc

Browse files
committed
build: add git hooks
1 parent fff1105 commit 2cc31fc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.hooks/pre-commit

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
pnpm run lint

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
}
2020
},
2121
"scripts": {
22+
"build": "rollup --config rollup.config.prod.mjs",
23+
"install-githooks": "if [ -d .git ]; then git config core.hooksPath .hooks; fi",
2224
"lint": "tsc && eslint . --ext ts,mts,tsx --report-unused-disable-directives --max-warnings 0",
2325
"lint:eslint": "eslint . --ext ts,mts,tsx --report-unused-disable-directives --max-warnings 0",
24-
"lint:tsc": "tsc",
25-
"build": "rollup --config rollup.config.prod.mjs"
26+
"lint:tsc": "tsc"
2627
},
2728
"devDependencies": {
2829
"@rollup/plugin-commonjs": "^25.0.3",

0 commit comments

Comments
 (0)