|
8 | 8 | "scripts": {
|
9 | 9 | "dev": "cross-env MOCK_SERVER_PORT=8086 vite",
|
10 | 10 | "build": "vue-tsc --noEmit && vite build",
|
11 |
| - "build:dev": "vue-tsc --noEmit && vite build --mode=development", |
12 | 11 | "preview": "vite preview",
|
| 12 | + "test": "vitest", |
13 | 13 | "lint": "eslint .",
|
14 | 14 | "lint:fix": "eslint . --fix",
|
15 |
| - "test": "vitest", |
16 | 15 | "release": "bumpp --commit --push --tag",
|
17 |
| - "prepare": "husky", |
18 |
| - "typecheck": "vue-tsc --noEmit" |
| 16 | + "typecheck": "vue-tsc --noEmit", |
| 17 | + "commitlint": "commitlint --edit", |
| 18 | + "prepare": "simple-git-hooks" |
19 | 19 | },
|
20 | 20 | "dependencies": {
|
21 | 21 | "@unhead/vue": "~1.11.19",
|
|
37 | 37 | },
|
38 | 38 | "devDependencies": {
|
39 | 39 | "@antfu/eslint-config": "4.3.0",
|
| 40 | + "@commitlint/cli": "^19.7.1", |
| 41 | + "@commitlint/config-conventional": "^19.7.1", |
| 42 | + "@commitlint/types": "^19.5.0", |
40 | 43 | "@iconify-json/carbon": "^1.2.7",
|
41 | 44 | "@intlify/unplugin-vue-i18n": "^6.0.3",
|
42 | 45 | "@types/lodash-es": "^4.17.12",
|
|
53 | 56 | "cross-env": "^7.0.3",
|
54 | 57 | "eslint": "^9.20.1",
|
55 | 58 | "eslint-plugin-format": "^1.0.1",
|
56 |
| - "husky": "^9.1.7", |
57 | 59 | "less": "^4.2.2",
|
| 60 | + "lint-staged": "^15.4.3", |
58 | 61 | "mockjs": "^1.1.0",
|
59 | 62 | "postcss-mobile-forever": "^4.4.0",
|
60 | 63 | "rollup": "^4.34.8",
|
| 64 | + "simple-git-hooks": "^2.11.1", |
61 | 65 | "terser": "^5.39.0",
|
62 | 66 | "typescript": "^5.7.3",
|
63 | 67 | "unocss": "66.0.0",
|
|
82 | 86 | },
|
83 | 87 | "resolutions": {
|
84 | 88 | "vite": "^6.1.0"
|
| 89 | + }, |
| 90 | + "simple-git-hooks": { |
| 91 | + "pre-commit": "pnpm lint-staged", |
| 92 | + "commit-msg": "pnpm commitlint $1" |
| 93 | + }, |
| 94 | + "lint-staged": { |
| 95 | + "*": "eslint --fix" |
85 | 96 | }
|
86 | 97 | }
|
0 commit comments