Skip to content

Commit d8c9428

Browse files
committed
chore: Update pre-commit and pre-push hooks for improved linting and danger integration
1 parent c25f420 commit d8c9428

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

.husky/pre-commit

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
# Run lint-staged first
5+
npx lint-staged
6+
7+
# Then run danger local checks
8+
npx danger local --base=main --dangerfile=dangerfile.lite.ts --staging

.husky/pre-push

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
# Run build and danger:prepush
5+
yarn build && yarn danger:prepush

.pre-commit-hooks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
entry: danger local
88
args:
99
- --base=main
10-
- --dangerfile=dangerfile.local.js
10+
- --dangerfile=dangerfile.lite.ts
1111
- --staging
1212
pass_filenames: false
1313
always_run: true

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
"husky": {
187187
"hooks": {
188188
"pre-commit": "lint-staged",
189-
"pre-push": "yarn build; yarn danger:prepush"
189+
"pre-push": "yarn build && yarn danger:prepush"
190190
}
191191
}
192192
}

0 commit comments

Comments
 (0)