Socket
Socket
Sign inDemoInstall

@axiomzen/cz-adaptor

Package Overview
Dependencies
0
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @axiomzen/cz-adaptor

Axiom Zen commitizen adaptor


Version published
Weekly downloads
122
increased by9.91%
Maintainers
3
Install size
8.11 kB
Created
Weekly downloads
 

Readme

Source

@axiomzen/cz-adaptor

Commitizen adaptor for consistent commits across codebases. When hooked up to commitizen, you're prompted for some input:

  1. Select the type of change
  2. Enter the reference issue
  3. Write a short commit message

Here's an example of the final formatted commit message:

📚 doc: adds instructions in readme (#21)

🔧 Setup in your project

  1. Initialize commitizen with this adaptor. This will automatically add the required configs to your package.json.

    NPM:

    npx commitizen init @axiomzen/cz-adaptor --save-dev --save-exact
    

    Yarn:

    npx commitizen init @axiomzen/cz-adaptor --yarn --dev --exact
    
  2. Add commitizen and commitlint to your project.

    NPM:

    npm install --save-dev commitizen commitlint husky
    

    Yarn:

    yarn add --dev commitizen commitlint husky
    
  3. Add scripts for commits.

    ...
    "scripts": {
      "commit": "git-cz"
    }
    
  4. Add husky hook

    ...
    "husky": {
      "hooks": {
          "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
      }
    }
    
  5. Add commitlint config.

    echo "module.exports = { extends: ['@axiomzen/cz-adaptor/commitlint'] };" > commitlint.config.js
    

👷‍♀️ Configuration

The adaptor supports a few configs that can be added to your project's package.json:

...

"config": {
  "commitizen": {
-   "path": "./node_modules/@axiomzen/cz-adaptor"
+   "path": "./node_modules/@axiomzen/cz-adaptor",
+   "@axiomzen/cz-adaptor": {
+     "issuePrompt": false
+   }
  }
}

...

Supported options:

  • issuePrompt
    • default: true
    • Toggles whether cz should ask for an issue number.
  • repos
    • default: []
    • Provide an array of repos that will be given to the user to choose from. By default, only the current repo is shown, though users may enter their own.
    • For proper linking on GitHub, repos should include the owner: ["axiomzen/cz-adaptor"]
    • If no repos are provided, the repo prompt is not shown.

FAQs

Last updated on 22 Oct 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc