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 28, 2024
1 parent f1ca807 commit b785d95
Show file tree
Hide file tree
Showing 3 changed files with 187 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
pre-push:
commands:
coverage:
run: |
npm run build &&
npm run test:coverage
pre-commit:
parallel: true
commands:
format:
glob: '*.{js,ts,md,yml}'
run: npm run fmt:check
license:
run: npm run test:license
audit:
run: |
npm run build &&
(run test:audit &
npm run test:circular &
npm run test:size &)
wait
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 b785d95

Please sign in to comment.