Skip to content

Commit e0efeae

Browse files
committed
chore: update husky to v9 setup
1 parent 5722579 commit e0efeae

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
yarn run ts-check && npx lint-staged

package.json

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"prettier:check": "prettier --check 'src/**/*'",
1919
"prettify": "prettier --write 'src/**/*'",
2020
"ts-check": "tsc -p tsconfig.json --noEmit",
21-
"test": "jest"
21+
"test": "jest",
22+
"prepare": "husky"
2223
},
2324
"repository": {
2425
"type": "git",
@@ -80,25 +81,17 @@
8081
"dependencies": {
8182
"throttle-debounce": "^2.1.0"
8283
},
83-
"husky": {
84-
"hooks": {
85-
"pre-commit": "yarn run ts-check && lint-staged"
86-
}
87-
},
8884
"lint-staged": {
8985
"*.{js,css,json,md}": [
90-
"prettier --write",
91-
"git add"
86+
"prettier --write"
9287
],
9388
"*.js": [
9489
"prettier --write",
95-
"eslint --fix",
96-
"git add"
90+
"eslint --fix"
9791
],
9892
"*.{ts,tsx}": [
9993
"prettier --write",
100-
"eslint --fix",
101-
"git add"
94+
"eslint --fix"
10295
]
10396
}
10497
}

0 commit comments

Comments
 (0)