Skip to content

foundy/commitlint-plugin-subject-references

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

commitlint-plugin-subject-references

subject-references is a plugin for applying references rules in subject.

Installation

$ npm install --save-dev commitlint-plugin-subject-references

Usage

module.exports = {
  extends: [
    '@commitlint/config-conventional'
  ],
  rules: {
    'references-empty': [2, 'never'],
    'subject-empty': [2, 'never'],
    'subject-trailing-references': [2, 'always']
  },
  plugins: [
    'commitlint-plugin-subject-references'
  ]
};

Rules

Use parentheses

# bad
$ git commit -m 'feat: my commit #1'

# good
$ git commit -m 'feat: my commit (#1)'

At the end of the line

# bad
$ git commit -m 'feat: (#1) my commit'

# good
$ git commit -m 'feat: my commit (#1)'

Multiple issues

# bad
$ git commit -m 'feat: my commit (#1 #2 #3)'

# bad
$ git commit -m 'feat: my commit (#1, #2, #3)'

# good
$ git commit -m 'feat: my commit (#1,#2,#3)'

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published