Skip to content

Commit d9c2853

Browse files
committed
add husky
1 parent f6b9193 commit d9c2853

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.husky/pre-commit

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

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"lint": "eslint -c eslint.config.js src",
66
"test": "jest src --coverage --verbose",
77
"jest-dev": "jest src --coverage --verbose --watch",
8-
"build": "ncc build src/index.js -o dest"
8+
"build": "ncc build src/index.js -o dest",
9+
"prepare": "husky"
910
},
1011
"repository": "git@github.com:adRise/update-pr-branch.git",
1112
"license": "MIT",
@@ -22,6 +23,7 @@
2223
"eslint": "^9.2.0",
2324
"eslint-plugin-jest": "^28.5.0",
2425
"globals": "^15.3.0",
26+
"husky": "^9.1.5",
2527
"jest": "^29.7.0"
2628
}
2729
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2395,6 +2395,11 @@ human-signals@^2.1.0:
23952395
resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0"
23962396
integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==
23972397

2398+
husky@^9.1.5:
2399+
version "9.1.5"
2400+
resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.5.tgz#2b6edede53ee1adbbd3a3da490628a23f5243b83"
2401+
integrity sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag==
2402+
23982403
ignore@^5.2.0:
23992404
version "5.3.1"
24002405
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef"

0 commit comments

Comments
 (0)