# commitlint2 **Repository Path**: summercode/commitlint2 ## Basic Information - **Project Name**: commitlint2 - **Description**: commitlint2 介绍 commitlint+husky规范commit 日志 集成最新版本的husky - **Primary Language**: JavaScript - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-02 - **Last Updated**: 2022-02-26 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # commitlint2 #### 介绍 commitlint2 介绍 commitlint+husky规范commit 日志 集成最新版本的husky #### husky6.0 经过一番查看才知道原来最新版本的husky(6.0.0)已经做了破坏性的变更,之前的设置方式已经失效了。 1. 安装husky npm install -D husky 2. 在packgae.json中添加prepare脚本 { "scripts": { "prepare": "husky install" } } # Install Husky v6 npm install husky --save-dev # or yarn add husky --dev # Activate hooks npx husky install # or yarn husky install # Add hook npx husky add .husky/commit-msg 'npx --no-install commitlint --edit "$1"' #### 参考文章 https://github.com/conventional-changelog/commitlint/#what-is-commitlint https://zhuanlan.zhihu.com/p/366786798