chore: initialize qiming workspace repository
This commit is contained in:
10
qiming/.husky/commit-msg
Normal file
10
qiming/.husky/commit-msg
Normal file
@@ -0,0 +1,10 @@
|
||||
# 优先使用 pnpm;若未安装则回退到 npx/yarn/bun
|
||||
if command -v pnpm >/dev/null 2>&1; then
|
||||
pnpm run verify-commit "$1"
|
||||
elif command -v bun >/dev/null 2>&1; then
|
||||
bun x max verify-commit "$1"
|
||||
elif command -v yarn >/dev/null 2>&1; then
|
||||
yarn verify-commit "$1"
|
||||
else
|
||||
npx --yes max verify-commit "$1"
|
||||
fi
|
||||
10
qiming/.husky/pre-commit
Normal file
10
qiming/.husky/pre-commit
Normal file
@@ -0,0 +1,10 @@
|
||||
# 优先使用 pnpm;若未安装则回退到 npx/yarn/bun
|
||||
if command -v pnpm >/dev/null 2>&1; then
|
||||
pnpm run lint-staged
|
||||
elif command -v bun >/dev/null 2>&1; then
|
||||
bun x lint-staged
|
||||
elif command -v yarn >/dev/null 2>&1; then
|
||||
yarn lint-staged
|
||||
else
|
||||
npx --yes lint-staged
|
||||
fi
|
||||
Reference in New Issue
Block a user