添加eslint、commitlint、husky配置
说在前面:注意安装版本,有些版本会有问题
这三个的步骤大致相同:
- 安装
- 在package.json里写对应的scripts
- 完善相关的js或其他类型文件
- 测试
其他注意点:
- 此次安装的commitlint版本:
"@commitlint/cli": "^17.0.2", "@commitlint/config-conventional": "^17.0.2",
- package.json还添加了(但是不是怎么新的版本)
"husky": {
"hooks": {
"pre-commit": "yarn lint-staged",
"commit-msg": "yarn commitlint -E HUSKY_GIT_PARAMS"
}
}
#悬赏#