Skip to content

Commit a30f02e

Browse files
committed
chore(husky): lint-staged 적용 및 pre-commit 실행 조건 수정
1 parent 71c9244 commit a30f02e

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

.husky/prepare-commit-msg

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
exec < /dev/tty && node_modules/.bin/cz --hook || true
4+
if [ $2 == "template" ]; then
5+
exec < /dev/tty && npx cz --hook || true
6+
fi

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@
9696
"type": "git",
9797
"url": "[email protected]:INT31302/neonadeul-i.git"
9898
},
99+
"lint-staged": {
100+
"*.{ts,md}": "npm run format"
101+
},
99102
"config": {
100103
"commitizen": {
101104
"path": "./node_modules/cz-conventional-changelog"

0 commit comments

Comments
 (0)