项目场景:
webstrom eslint阻止git提交
问题描述
使用软件webstrom,使用git提交代码时,eslint检测不通过,不让我提交代码,提示我修复。
Commit failed with error
0 file committed, 1 file failed to commit: 1
husky > pre-commit (node v14.17.5)
Stashing changes... [started]
Stashing changes... [skipped]
→ No partially staged files found...
Running linters... [started]
Running tasks for src/**/*.{js,vue} [started]
eslint --fix [started]
eslint --fix [failed]
解决方案:
项目下面有个eslint忽略文件,只要在这个文件中写了你要忽略的文件路径,提交时eslint不会检测对应的文件