首先需要安装commitizen和commitlint-config-cz和cz-customizable npm install commitizen commitlint-config-cz cz-customizable --save -D 然后新建.cz-config.js文件,内容如下: 'use strict'module.exports= {types: [ {value:'feat',name:'新增:新增功能、页面'}, {value:'fix',name:'bug:修复某个bug'}, ...
commitlint-config-czmerges{types,scopes,scopeOverrides}(cz-customizable config) withrules.{type-enum,scope-enum}(commitlint config) andincludes some modules and APIfor config conversion. Supported Config commitlint-config-cz use only one config in the following order of precedence. ...
# 安装依赖yarnaddcz-customizable -D 配置命令 "script":{"commit":"git-cz"} 在package.json 中添加自定义commitizen,使用git-cz执行git commit命令 "config": { "commitizen": { "path":"./node_modules/cz-customizable"} } 在根目录创建的.cz-config.js, 自定义commit提示内容 module.exports = {typ...
目前用的是npm i lint-staged @commitlint/cli @commitlint/config-conventional commitizen cz-customizable --save-dev 但是效果不行。 无法保持上次错误的提交信息。。 工程化前端工程化git 有用关注2收藏 回复 阅读1.8k 1 个回答 得票最新 Feng_Yu 12.6k62139 发布于 2021-07-21 本地解决方案可以用git hoo...
2.git cz提交 commitizen用git进行提交规范,方便多人共同开发时,代码格式的统一 在项目中安装cz-customizable npm i cz-customizable --save-dev 1.在package.json中进行新增 "config": {"commitizen": {"path":"./node_modules/cz-customizable"},"cz-customizable": {"config":"./.cz-config.js"} ...
在项目根目录下新建.cz-config.js文件 // 配置文件可参考https://github.com/leoforfree/cz-customizable/blob/HEAD/cz-config-EXAMPLE.js自行配置不做详细说明 module.exports = { types: [ { value: ':sparkles: feat', name: '✨ feat: 一项新功能' }, { value: ':bug: fix', name: '🐛 fix...
cz-customizable commitlint-config-cz @commitlint/config-conventional 使用Vite 初始化工程 项目中使用的的是vite 4.2.0的版本 使用yarn执行 yarn create vite 1. 输入项目名称,选择Vue,TypeScrip 按照提示执行以下命令即可 cd warbler-fe yarn yarn dev
"commitlint-config-cz": "^0.13.2", "concurrently": "^5.3.0", "cross-env": "^7.0.2", "css-loader": "^3.5.3", "cz-customizable": "^6.3.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.3", @@ -87,7 +90,8 @@ }, ...
这个弹框是因为commitlint校验不通过。 手动填写提交信息很难达到校验标准,这个时候应该使用命令行运行 npm run commit。 点击暂存之后,控制台运行 npm run commit: 以上命令行交互是Commitizen实现的。 因为vscode提交已经习惯了用按钮去提交,之后提交需要用npm run commit替代git commit指令进行提交。会改变整个操作流程...
本文主要分享一个项目的规范约束从0到1的流程,从通过vue-cli创建项目,到团队协作插件安装(husky、eslint、commitlint、prettier等)。 本文vue-cli脚手架为5.x 本文webpack版本为5.x 本文vue版本为3.x 2,创建项目 如果你的vue-cli不是5.x版本,并且不知道怎么创建vue-cli项目,请先查看该文章:传送门 ...