我不熟悉git hooks,我已经尝试过关注git docs,但我没有运气实现这个问题pre-commit hook。下面是我所做过的一个屏幕截图。
当我git add
一个文件,然后尝试提交它时,我得到的只有:
[eslint-experimental 123123abc] some_message
1 fele changed, 10 insertions(+), 3 deletions(-)
为什么不是linting the staged file?
答案 0 :(得分:1)
检查您的挂钩是否在
中<path/to/your/local/repo>/.git/hooks/
确保它是可执行的(chmod 755)