1.2 在不带commitzen的情况下使用cz-customizable 3. commitlint 3.1 安装 3.2 配置 前言 主要使用的技术 pnpm cz-customizable commitlint husky 推荐一个代码规范模板 vite / vue3 / typescript / cz-customizable / commitlint / husky / eslint / prettier / lint-staged 1. 项目初始化 项目初始化 pnpm ini...
使用 用 git cz -m 代替 git commit -m 就可以轻松的写出 Angular 规范的 commit message 了。 commit message header 格式如下: type:commit 的类型,有如下7种: scope:commit 影响的范围 subject:commit 目的的简...简单使用Commitizen-规范你的commit message [TOP] 最近在学习规范使用git开发,发现一个...
首先需要安装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. ...
cz-customizable commitlint-config-cz @commitlint/config-conventional 使用Vite 初始化工程 项目中使用的的是 vite 4.2.0 的版本 使用yarn 执行 代码语言:javascript 代码运行次数:0 运行 AI代码解释 yarn create vite 输入项目名称,选择 Vue, TypeScrip 按照提示执行以下命令即可 代码语言:javascript 代码运行次...
在package.json 中添加自定义commitizen,使用git-cz执行git commit命令 "config": { "commitizen": { "path":"./node_modules/cz-customizable"} } 在根目录创建的.cz-config.js, 自定义commit提示内容 module.exports = {types: [ {value:'feat',name:'✨feat: 新功能'}, ...
cz-customizable commitlint-config-cz @commitlint/config-conventional 使用Vite 初始化工程 项目中使用的的是vite 4.2.0的版本 使用yarn执行 AI检测代码解析 yarn create vite 1. 输入项目名称,选择Vue,TypeScrip 按照提示执行以下命令即可 AI检测代码解析
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"} ...
两点都满足后,才可以git 提交成功。 最好的情况是 提交失败的情况下,成员修改了代码后,再次提交时,反显上次的错误信息,省得再输。 目前用的是npm i lint-staged @commitlint/cli @commitlint/config-conventional commitizen cz-customizable --save-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 @@ }, ...