admin管理员组文章数量:1287505
I created an empty git project and then added a git hook to auto-format my code using prettier when code is commited. I followed the prettier docs and the hook works, however it's very slow. Taking something like 5 seconds when only one file was committed. I've uploaded a short video demonstrating this.
From the husky docs it looks like the hook should run much faster.
Have I set it up wrong?
Here is content of the package.json file if that helps.
{
"devDependencies": {
"prettier": "^3.5.1"
},
"lint-staged": {
"*.{js,css,md}": "prettier --write"
},
"scripts": {
"prepare": "husky install"
}
}
本文标签: githooksGit hook using lintstaged is very slowStack Overflow
版权声明:本文标题:githooks - Git hook using lint-staged is very slow - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741314003a2371809.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论