0.0.5 • Published 7 months ago

@cjlumi/commitlint-config v0.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

@cjlumi/commitlint-config

安装

使用时需要配合安装 @commitlit/cli

pnpm add @cjlumi/commitlint-config @commitlint/cli --save-dev

使用

commitlint.config.js 中集成本包:

module.exports = {
	extends: ['@cjlumi/commitlint-config'],
};

设置 git hook

可通过 husky 设置在 git commit 时触发 commitlint

首先安装 husky:

pnpm add husky --save-dev

启用 Git hooks

pnpm dlx husky install

该命令会创建 .husky/ 目录并指定该目录为 git hooks 所在的目录。

添加 commit-msg hook

pnpm dlx husky add .husky/commit-msg 'npx commitlint --edit $1'
0.0.5

7 months ago

0.0.3

7 months ago

0.0.1

7 months ago