Skip to content

Commit 90578ae

Browse files
committed
chore: upgrade husky
1 parent abc23d3 commit 90578ae

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

.husky/pre-commit

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npm run lint && npm run typecheck

package.json

+3-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
"fix": "eslint --fix \"**/*.{vue,ts,js}\"",
1717
"release": "bumpp",
1818
"test": "vitest",
19-
"typecheck": "vue-tsc --noEmit"
19+
"typecheck": "vue-tsc --noEmit",
20+
"prepare": "husky install"
2021
},
2122
"exports": {
2223
".": {
@@ -30,11 +31,6 @@
3031
"component",
3132
"vite"
3233
],
33-
"husky": {
34-
"hooks": {
35-
"pre-commit": "npm run lint && npm run typecheck"
36-
}
37-
},
3834
"author": "peterroe",
3935
"license": "MIT",
4036
"devDependencies": {
@@ -45,7 +41,7 @@
4541
"eslint": "8.24.0",
4642
"gh-pages": "4.0.0",
4743
"happy-dom": "6.0.4",
48-
"husky": "4.3.8",
44+
"husky": "8.0.1",
4945
"rimraf": "3.0.2",
5046
"typescript": "4.8.4",
5147
"vite": "3.1.4",

vite.config.ts

-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ export default defineConfig({
1010
cleanVueFileName: true,
1111
}),
1212
],
13-
test: {
14-
environment: 'happy-dom',
15-
},
1613
build: {
1714
lib: {
1815
entry: './src/index.ts',

vitest.config.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineConfig } from 'vitest/config'
2+
3+
export default defineConfig({
4+
test: {
5+
environment: 'happy-dom',
6+
},
7+
})

0 commit comments

Comments
 (0)