@bit-ocean/commitlint-config
TypeScript icon, indicating that this package has built-in type declarations

0.0.53 • Public • Published

@bit-ocean/commitlint-config

npm

Universal Commitlint configuration.

Installation

pnpm add -D @commitlint/cli @commitlint/config-conventional cz-git commitizen @bit-ocean/commitlint-config

Configuration

Create a .commitlintrc.json file in the root of your project and add the following:

{
  "extends": ["@bit-ocean"]
}

Then add the following properties to your package.json:

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

Husky Configuration

Run following command to add husky and a commit-msg hook:

pnpm add -D husky
pnpm i
npx husky init
echo 'npx --no -- commitlint --edit "$1"' > .husky/commit-msg

Usage

Run the following command to commit your changes:

git add .
pnpm cz

License

MIT License © 2024 Bit Ocean

Package Sidebar

Install

npm i @bit-ocean/commitlint-config

Weekly Downloads

28

Version

0.0.53

License

MIT

Unpacked Size

26.3 kB

Total Files

9

Last publish

Collaborators

  • brucesong
  • zhiblcx