🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more
Socket
Book a DemoInstallSign in
Socket

@fe6/norm-git-cz-config

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fe6/norm-git-cz-config

Git 提交信息的管理

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

@fe6/norm-git-cz-config

Git 提交信息的管理

配置之前

安装相关依赖,运行 pnpm add -D @commitlint/cli @commitlint/config-conventional

如何配置

  • 自定义 git-cz 的选项
// 根目录的 package.json
"config": {
  "commitizen": {
    "path": "./node_modules/cz-customizable"
  },
  "cz-customizable": {
    "config": "./node_modules/@fe6/norm-git-cz-config/customizable.js"
  }
}
  • Git commit 验证
// 根目录的 commitlint.config.js
module.exports = {
  extends: ["@fe6/norm-git-cz-config"],
};

在 husky 中使用

  • /.husky/commit-msg 中添加

#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx --no-install commitlint --edit $1
  • /commitlint.config.js 中添加
module.exports = {
  extends: ["@fe6/norm-git-cz-config"],
};

Keywords

@fe6/norm

FAQs

Package last updated on 07 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts