npm install husky --save-dev. 然后修改package.json,增加配置: { "husky": { "hooks": { "pre-commit": "eslint ." } }, }.
確定! 回上一頁