Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 263 Bytes

pre-commit.md

File metadata and controls

17 lines (12 loc) · 263 Bytes

pre-commit

一个好用的git钩子


安装: npm install pre-commit -S

package.json 添加

"pre-commit": [
  "lint"
]

lintnode scripts 任务

设置以后 每次执行 git commit 的时候 就会自动检查是否通过