Skip to content

Commit 21e8970

Browse files
committed
Add lefthook for pre-push hooks
1 parent 56a63ad commit 21e8970

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

bun.lock

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

lefthook.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pre-push:
2+
parallel: false
3+
jobs:
4+
- name: lint-fix
5+
run: bunx biome check --write src/
6+
stage_fixed: true
7+
- name: type-check
8+
run: bun run check-types
9+
- name: test
10+
run: bun run test

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"types": "dist/index.d.ts",
2626
"devDependencies": {
2727
"@biomejs/biome": "2.2.2",
28+
"lefthook": "^2.1.4",
2829
"@changesets/cli": "2.29.6",
2930
"@types/node": ">=12.0.0",
3031
"@vitest/coverage-v8": "3.2.4",
@@ -46,6 +47,7 @@
4647
"dist/**"
4748
],
4849
"scripts": {
50+
"postinstall": "lefthook install",
4951
"build": "tsup src/index.ts src/resources/ --format cjs,esm --dts",
5052
"check-types": "tsc --noEmit",
5153
"lint:check": "biome check .",

0 commit comments

Comments
 (0)