config-conventional}# For Windows:npm install --save-dev @commitlint/config-conventional @commitlint/cli# Configure commitlint to use conventional config# 这里windows下有坑,最好直接创建commitlint.config.js然后复制进去 | 当然也可以创建后再调整编码和换行符# 使用echo创建的时候默认是UTF-16LE,具体请看上...
npm install--save-dev @commitlint/{cli,config-conventional}# For Windows:npm install--save-dev @commitlint/config-conventional @commitlint/cli # Configure commitlint to use conventional config # 这里windows下有坑,最好直接创建commitlint.config.js然后复制进去|当然也可以创建后再调整编码和换行符 # 使用...
config-conventional}#For Windows:npm install --save-dev @commitlint/config-conventional @commitlint/cli#Configure commitlint to use conventional config#这里windows下有坑,最好直接创建commitlint.config.js然后复制进去 | 当然也可以创建后再调整编码和换行符#使用echo创建的时候默认是UTF-16LE,具体请看上面的Win...
npm install commitlint-cetacea @commitlint/cli --save-dev 使用 在commitlint.config.js 中集成本包: module.exports = { extends: ['commitlint-cetacea'], }; 设置git hook 可通过 husky 设置在 git commit 时触发 commitlint。 首先安装 husky: npm install husky --save-dev 然后执行添加commit-msg: npx...
Lint your commit messages. Latest version: 19.6.1, last published: 11 days ago. Start using commitlint in your project by running `npm i commitlint`. There are 113 other projects in the npm registry using commitlint.
pnpm install @commitlint/cli @commitlint/config-conventionalthird step{ "scripts": { "prepare": "husky install" }}npm install安装完项目依赖后会执行 husky install命令 forth step npx husky install 创建.husky文件,否在直接输入下面的命名要报错npx husky add .husky/commit-msg 'npx --no-install ...
husky是Git hooks 工具,可以防止使用 Git hooks 的一些不好的 commit 或者 push。) #安装husky 依赖 npm install husky --save-dev #启用 Git 挂钩npx husky install#自动启用hooksnpmset-script prepare"husky install"#添加 commit-msg 钩子npx huskyadd.husky/commit-msg'npx --no-install commitlint --edit...
npm install --save-dev @commitlint/config-conventional @commitlint/cli 2、安装commitlint/cli yarn add husky pre-commit lint-staged @commitlint/cli @commitlint/config-conventional -D 3、生成commitlint配置文件 echo"module.exports = {extends: ['@commitlint/config-conventional']};"> commitlint.config....
npm install husky -D 新建commit-msg文件并写入hook执行命令 npx husky add .husky/commit-msg "npx --no -- commitlint --edit $1" 以上完成在git commit 发起提交前执行commitlint检查是否符合规范。可使用git cz 命令代替git commit提交代码 项目规范 ...
npm install--save-dev@commitlint/config-conventional@commitlint/cli 二 配置 生成配置文件commitlint.config.js,当然也可以是 .commitlintrc.js echo"module.exports = {extends: ['@commitlint/config-conventional']};"> commitlint.config.js 在husky的配置加入CommitlIint配置,v1.0.1版本以后为HUSKY_GIT_PARAMS...