npm install commitlint-config-cz --save-dev Usage Extend your commitlint config byczincommitlint.config.js. module.exports={extends:['other-config','cz']}; Modules & API commitlint-config-cz includes some modules and API for config conversion. ...
2.从 cz-customizable 和cz-conventional-changelog的规则出发,将 cz-customizable 和cz-conventional-changelog规则翻译为 commitlint 规则,即创造一个 commitlint 配置,commitlint-config-cz 已实现。 commitlint-config-cz的使用: commitizen 和 commitlint相关包安装和配置(看本文档的前面章节)成功之后。 安装commitlint-c...
安装cz-git的前提是已经安装过commitizen,前面已经安装了这里就不在赘述 pnpm add cz-git-D 配置package.json "scripts":{"commit":"git add -A && git-cz"}"config":{"commitizen":{"path":"node_modules/cz-git"}} 配置模板 cz-git给出了一些推荐配置模板:https://cz-git.qbb.sh/zh/config/,我们...
//package.json{//..."config":{"commitizen":{"path":"./node_modules/cz-conventional-changelog"}}} 查看更多 由于我们的commitizen安装在本地开发环境, 所以全局环境中并没有cz命令, 我们在package.json文件的scripts中增加一条脚本命令: {"scripts":{"commit":"cz"}} 然后我们就可以在终端使用pnpm comm...
/** @type {import('cz-git').UserConfig} */ constfs=require('fs') constpath=require('path') /* 获取项目的修改范围 */ constscopes=fs .readdirSync(path.resolve(__dirname,'src'),{withFileTypes:true}) .filter((dirent)=>dirent.isDirectory()) ...
本地会新建一个配置文件 commitlint.config.js 配置husky Husky 会新建一个 Hook, 随后可以详细设置一下所需要的 Hooks: 详细配置 husky Hooks 配置commitizen 并设置 cz 作为工具 安装完毕之后可以使用 yarn commit 来调用 cz 以实现格式化 commit 安装lint-staged 以配置 pre commit hook 进行检查 安装lint-staged...
背景:commitizen的交互方式可能不适合所有人,因此国内开发者开发了czgit。优势:czgit提供了更符合国人习惯的交互性和更高的自定义性。配置:通过安装czgit并配置package.json和czgit.config.cjs,可以进一步优化提交流程。其他工具推荐:VSCode插件:对于喜欢简洁的开发者,VSCode的gitcommitplugin插件也是一...
"scripts":{"commit":"git add -A && git-cz"}"config":{"commitizen":{"path":"node_modules/cz-git"}} 配置模板cz-git给出了一些推荐配置模板:https://cz-git.qbb.sh/zh/config/,我们在之前的commitlint.config.cjs文件上,进行修改 由于配置中含有图案,上传可能导致错误,需要源代码的,可以到https:...
eslint-plugineslint-configstylelint-configjavascript-toolkitprettier-configcommitlint-config UpdatedFeb 9, 2025 TypeScript whizark/commitlint-config-cz Sponsor Star36 ⚙️ commitlint sharable configuration, automatically converts/merges your cz-customizable (commitizen) config. ...
/** @type {import('cz-git').UserConfig} */ module.exports = { ignores: [commit => commit.includes("init")], extends: ["@commitlint/config-conventional"], rules: { // @see: https://commitlint.js.org/#/reference-rules "body-leading-blank": [2, "always"],...