Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

commitlint-config-jira

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commitlint-config-jira

A recomended config who contain preconfigured rules for jira commits messages style

  • 1.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
45K
increased by8.4%
Maintainers
1
Weekly downloads
 
Created
Source

commitlint-config-jira

A recomended config who contain preconfigured rules for jira commits messages style. Part of commitlint-jira monorepo

GitHub

Getting started.

Install dependencies
npm install --save-dev @commitlint/cli commitlint-plugin-jira-rules commitlint-config-jira
  • commitlint-config-jira - is a recomended config who contain preconfigured rules for jira commits messages style. See all rules in description below
  • commitlint-plugin-jira-rules - is a plugin that implement all jira commits messages style rules and validate commit messages
Configure commitlint to use jira commits messages style config
// commitlint.config.js
module.exports = {
  plugins: ['commitlint-plugin-jira-rules'],
  extends: ['commitlint-config-jira'],
}
To lint commits before they are created you can use Husky's 'commit-msg' hook
// package.json
{
  "husky": {
    "hooks": {
      "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
    }
  }
}

Rules

jira-task-id-empty - this rule check if commit message task id is not empty.

// ❌ Bad commit messages
git commit -m"My commit message body"
git commit -m":My commit message body"
// ✅ Good commit messages
git commit -m"IB-2121, IB-21: My commit message body"
git commit -m"IB-21: My commit message body"

jira-task-id-max-length - this rule check if jira task id length is loonger that the provided value.

// Preconfigured and recomended value in commitlint-config-jira is 9 chars
// ❌ Bad commit messages
git commit -m"IB-2121212121212121: My commit message body"
// ✅ Good commit messages
git commit -m"IB-2121: My commit message body"
git commit -m"IB-21: My commit message body"

jira-task-id-min-length - this rule check if jira task id length is shorter that the provided value.

// Preconfigured and recomended value in commitlint-config-jira is 3 chars
// ❌ Bad commit messages
git commit -m"I1: My commit message body"
// ✅ Good commit messages
git commit -m"IB-2121: My commit message body"
git commit -m"IB-21: My commit message body"

jira-task-id-case - this rule check if taskId is in provided case.

// Preconfigured and recomended value in commitlint-config-jira is "uppercase"
// ❌ Bad commit messages
git commit -m"ib-21: My commit message body"
// ✅ Good commit messages
git commit -m"IB-2121, IB-21: My commit message body"
git commit -m"IB-21: My commit message body"

jira-task-id-separator - this rule check if taskId header and footer is separated with provided value.

// Preconfigured and recomended value in commitlint-config-jira is "-"
// ❌ Bad commit messages
git commit -m"IB/21: My commit message body"
git commit -m"IB_21 :My commit message body"
// ✅ Good commit messages
git commit -m"IB-2121, IB-21: My commit message body"
git commit -m"IB-21: My commit message body"

jira-commit-status-case - this rule check if commit status is in provided case.

// Preconfigured and recomended value in commitlint-config-jira is "uppercase"
// ❌ Bad commit messages
git commit -m"[wip]IB-21: My commit message body"
// ✅ Good commit messages
git commit -m"[WIP]IB-21: My commit message body"

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

@Gherciu/commitlint-jira © GHERCIU, Released under the MIT License.
Authored and maintained by GHERCIU with help from contributors (list).

If you like this repository star⭐ and watch👀 on GitHub

Keywords

FAQs

Package last updated on 23 Sep 2019

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc