0.0.6 • Published 9 months ago

@raipiot-infra/commitlint-config v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@raipiot-infra/commitlint-config

npm

raipiot infra 通用 commitlint 配置。

安装

pnpm add -D @commitlint/cli @commitlint/config-conventional cz-git commitizen @raipiot-infra/commitlint-config

配置

在根目录下添加 .commitlintrc.json 文件,内容如下:

{
  "extends": ["@raipiot-infra"]
}

package.json 中添加:

{
  "scripts": {
    "cz": "git-cz"
  },
  "config": {
    "commitizen": {
      "path": "node_modules/cz-git"
    }
  }
}

huskycommit-msg 钩子中添加:

echo "npx --no -- commitlint --edit \"$1\"" > .husky/commit-msg

通过 git-cz 命令来提交代码:

git add .
pnpm cz
0.0.5

9 months ago

0.0.6

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.4

9 months ago

0.0.1

9 months ago