Open fangmd opened 1 year ago
配置 husky 添加 git hooks
# install pnpm add -D husky # enable npx husky install npm pkg set scripts.prepare="husky install"
npx husky add .husky/pre-commit "pnpm precommit"
# package.json "precommit": "lint-staged --allow-empty",
pnpm add -D lint-staged
#package.json "lint-staged": { "src/**/*.{jsx,tsx,ts,js,json,css,less,md}": [ "prettier --write", "git add ." ] }
配置 husky 添加 git hooks