谢谢老师, 文档找到了https://typicode.github.io/husky/#/?id=custom-directory
By design, husky install must be run in the same directory as .git, but you can change directory during prepare script and pass a subdirectory:
// package.json
{
"scripts": {
"prepare": "cd .. && husky install front/.husky"
}
}