Skip to content

Commit 7c72394

Browse files
authored
DX: Husky (#11)
* chore: husky test * chore: add husky precommit
1 parent 16b253f commit 7c72394

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn prepublishOnly && yarn format:fix

package.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@
4848
"format": "prettier --check .",
4949
"format:fix": "prettier --write .",
5050
"stylelint": "stylelint **/*.css",
51-
"stylelint:fix": "stylelint **/*.css --fix",
51+
"stylelint:fix": "stylelint **/*.scss --fix",
5252
"storybook": "storybook dev -p 6006",
5353
"build-storybook": "storybook build",
5454
"test": "vitest",
5555
"test:ui": "vitest --ui",
5656
"coverage": "vitest run --coverage",
57-
"prepublishOnly": "vitest run && yarn run build"
57+
"prepublishOnly": "vitest run && yarn run build",
58+
"prepare": "husky"
5859
},
5960
"module": "./dist/main.js",
6061
"files": [
@@ -107,7 +108,8 @@
107108
"vite-plugin-dts": "4.5.1",
108109
"vite-plugin-externals": "^0.6.2",
109110
"vite-plugin-lib-inject-css": "2.2.1",
110-
"vitest": "3.0.7"
111+
"vitest": "3.0.7",
112+
"husky": "^9.1.7"
111113
},
112114
"main": "main.js",
113115
"repository": {

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -3005,6 +3005,11 @@ https-proxy-agent@^7.0.6:
30053005
agent-base "^7.1.2"
30063006
debug "4"
30073007

3008+
husky@^9.1.7:
3009+
version "9.1.7"
3010+
resolved "https://registry.yarnpkg.com/husky/-/husky-9.1.7.tgz#d46a38035d101b46a70456a850ff4201344c0b2d"
3011+
integrity sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==
3012+
30083013
30093014
version "0.6.3"
30103015
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501"

0 commit comments

Comments
 (0)