Stack Builder

Commitizen

Standardize and streamline your commit messages with Commitizen, ensuring they adhere to your project's conventions.

Installation

Terminal
npm i -D commitizen @commitlint/cz-commitlin inquirer

Configuration

Terminal
touch .cz.json # In root directory
echo '{ "path": "@commitlint/cz-commitlint" }' > .cz.json

Add package.json script

package.json
...
  "scripts": {
    "build": "next build",
    "dev": "next dev",
    "start": "next start",
    "lint": "eslint .",
    "lint:fix": "eslint . --fix",
    "lint:inspect": "npx @eslint/config-inspector",
    "prepare": "husky"
+   "commit": "cz"
  },
  ...

Last updated on

On this page

Edit on GitHub