Skip to content

Commit 4dcee7e

Browse files
committed
feat: husky and lint staged
1 parent 65e33a7 commit 4dcee7e

File tree

3 files changed

+174
-1
lines changed

3 files changed

+174
-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

package.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"preview": "nuxi preview",
99
"postinstall": "nuxi prepare",
1010
"lint": "eslint . --fix",
11-
"typecheck": "nuxi typecheck"
11+
"typecheck": "nuxi typecheck",
12+
"prepare": "husky install"
1213
},
1314
"dependencies": {
1415
"@vueuse/nuxt": "^10.7.0",
@@ -22,10 +23,15 @@
2223
"@nuxtjs/tailwindcss": "^6.10.1",
2324
"@types/node": "^20.10.6",
2425
"eslint": "^8.56.0",
26+
"husky": "^8.0.3",
27+
"lint-staged": "^15.2.0",
2528
"nuxt": "^3.9.0",
2629
"nuxt-site-config": "^2.1.3",
2730
"nuxt-site-config-kit": "^2.1.3",
2831
"typescript": "^5.3.3",
2932
"vue-tsc": "^1.8.27"
33+
},
34+
"lint-staged": {
35+
"*.ts": "pnpm run lint"
3036
}
3137
}

pnpm-lock.yaml

Lines changed: 163 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)