A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://commitlint.js.org/guides/use-prompt.html below:

Website Navigation


Guide: Use prompt | commitlint

Guide: Use prompt

@commitlint/prompt-cli helps with fast authoring of commit messages and ensures they adhere to the commit convention configured in commitlint.config.js.

Install
  1. Create a git repository if needed

  2. Create a package.json if needed

  3. Install and configure if needed

    npmyarnpnpmbundeno

    sh
    npm install --save-dev @commitlint/cli @commitlint/config-conventional @commitlint/prompt-cli
    
    echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
    sh
    yarn add --dev @commitlint/cli @commitlint/config-conventional @commitlint/prompt-cli
    
    echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
    sh
    pnpm add --save-dev @commitlint/cli @commitlint/config-conventional @commitlint/prompt-cli
    
    echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
    sh
    bun add --dev @commitlint/cli @commitlint/config-conventional @commitlint/prompt-cli
    
    echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
    sh
    deno add --dev npm:@commitlint/cli npm:@commitlint/config-conventional npm:@commitlint/prompt-cli
    
    echo "export default { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
Provide a shortcut

To make prompt-cli easy to use, add a npm run-script to your package.json

json
{
  "scripts": {
    "commit": "commit"
  }
}

1
2
3
4
5

Test the prompt by executing

npmyarnpnpmbundeno

sh
git add .
npm run commit
sh
git add .
deno task commit
An alternative to @commitlint/prompt-cli: commitizen

Another way to author commit messages that adhere to the commit convention configured in commitlint.config.js is to use commitizen. For more information, checkout their official website.

commitlint provides two adapters for commitizen:

  1. @commitlint/prompt provides a way to interact same as @commitlint/prompt-cli
  2. @commitlint/cz-commitlint is inspired by cz-conventional-changelog, it provides a more modern way to interact.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4