0.0.6 • Published 8 months ago

@raipiot-infra/commitlint-config v0.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
8 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

8 months ago

0.0.6

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.4

8 months ago

0.0.1

8 months ago