chore: 切换到 husky

This commit is contained in:
sealday 2024-04-08 13:19:22 +08:00
parent e87024f8d2
commit 8a150bbe7f
4 changed files with 438 additions and 126 deletions

1
.husky/commit-msg Normal file
View File

@ -0,0 +1 @@
pnpm commitlint --edit

1
.husky/pre-commit Normal file
View File

@ -0,0 +1 @@
pnpm lint-staged

View File

@ -19,6 +19,7 @@
"nocobase": "nocobase", "nocobase": "nocobase",
"pm": "nocobase pm", "pm": "nocobase pm",
"pm2": "nocobase pm2", "pm2": "nocobase pm2",
"prepare": "husky",
"release": "lerna publish", "release": "lerna publish",
"release:force": "lerna publish from-package --yes", "release:force": "lerna publish from-package --yes",
"run:example": "tsx -r dotenv/config -r tsconfig-paths/register ./examples/index.ts", "run:example": "tsx -r dotenv/config -r tsconfig-paths/register ./examples/index.ts",
@ -41,12 +42,6 @@
"eslint --fix" "eslint --fix"
] ]
}, },
"config": {
"ghooks": {
"pre-commit": "pnpm lint-staged",
"commit-msg": "commitlint --edit"
}
},
"dependencies": { "dependencies": {
"pm2": "^5.2.0", "pm2": "^5.2.0",
"rimraf": "^3.0.0" "rimraf": "^3.0.0"
@ -67,7 +62,7 @@
"commander": "^9.2.0", "commander": "^9.2.0",
"eslint-plugin-jest-dom": "^5.0.1", "eslint-plugin-jest-dom": "^5.0.1",
"eslint-plugin-testing-library": "^5.11.0", "eslint-plugin-testing-library": "^5.11.0",
"ghooks": "^2.0.4", "husky": "^9.0.11",
"lint-staged": "^13.2.3", "lint-staged": "^13.2.3",
"prettier": "^3.1.1", "prettier": "^3.1.1",
"prettier-plugin-packagejson": "^2.4.14", "prettier-plugin-packagejson": "^2.4.14",

File diff suppressed because it is too large Load Diff