I have configured husky in my project. It is running the pre-commit hook with "lint-staged" to use "prettier" to format the code before each commit.
The configuration works fine when I use the terminal to invoke the git commit
.
However, if I commit the files using vs code source control panel to commit, it just commits without running the pre-commit hook. I am using windows 10. pre-commit file:
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx "lint-staged"
4. 用于“倾斜”的包装
"lint-staged":{
"*.{js,json,css,md}": [
"prettier --write"
]
}
v. 编码源控制小组
我如何解决这个问题,以援引预先承诺,在何时要求承诺,尽管它来自密码?