Skip to content

Commit

Permalink
build: add pre-commit & pre-push hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
easymikey committed Dec 29, 2024
1 parent f1ca807 commit 64f76d3
Show file tree
Hide file tree
Showing 3 changed files with 185 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
pre-push:
parallel: true
commands:
coverage:
run: npm run test:coverage
audit:
run: npm run test:audit

pre-commit:
parallel: true
commands:
format:
glob: '*.{js,ts,md,yml}'
run: npm run fmt:check
license:
run: npm run test:license
size:
run: npm run test:size
circular:
run: npm run test:circular
164 changes: 164 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
"get-port": "^7.1.0",
"globby": "^14.0.2",
"jsr": "^0.13.2",
"lefthook": "^1.10.1",
"madge": "^8.0.0",
"minimist": "^1.2.8",
"node-fetch-native": "^1.6.4",
Expand Down

0 comments on commit 64f76d3

Please sign in to comment.