Open xgqfrms opened 4 years ago
https://github.com/typicode/husky
https://www.npmjs.com/package/husky
// package.json { "husky": { "hooks": { "pre-commit": "npm test", "pre-push": "npm test", "...": "..." } } }
{ "scripts": { "build": "rollup -c", "watch": "rollup -c --watch", "serve": "COOKIE_SECRET=devonly nodemon --watch .data/dist/server .data/dist/server", "start": "node ./start.js", "watchnserve": "npm run build && (npm run watch & npm run serve)" }, "devDependencies": { "husky": "4.2.5", "lint-staged": "10.2.2", }, "husky": { "hooks": { "pre-commit": "lint-staged" } }, "lint-staged": { "*.{js,css,md,ts,tsx}": "prettier --write" } }
https://www.cnblogs.com/xgqfrms/p/11650177.html#4569097
git hooks & husky & eslint
https://github.com/typicode/husky
https://www.npmjs.com/package/husky
https://www.cnblogs.com/xgqfrms/p/11650177.html#4569097