Skip to content

Commit

Permalink
πŸ“¦ NEW: commit lint config
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadawais committed Sep 15, 2018
1 parent 09409e7 commit 9be6839
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .commitlintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* Commit Lint
*
* Rules are made up by a name and a configuration array.
* The configuration array contains:
* 1. Level: | [0..2] | 0 = disables | 1 = considered a warning | 2 an error for the rule.
* 2. Applicable: | always/never | never inverts the rule.
* 3. Value: | value to use for this rule.
*
* @link https://github.com/marionebl/commitlint/blob/master/docs/reference-rules.md
*/

module.exports = {
parserPreset: {
parserOpts: {
headerPattern: /^(.*\w*): (.*)$/,
headerCorrespondence: ['type', 'subject']
}
},
rules: {
'body-leading-blank': [1, 'always'],
'footer-leading-blank': [1, 'always'],
'header-max-length': [2, 'always', 72],
'scope-case': [2, 'always', 'lower-case'], // ?
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-empty': [2, 'never'],
'type-case': [2, 'always', 'upper-case'],
'type-enum': [2, 'always', ['πŸ“¦ NEW', 'πŸ‘Œ IMPROVE', 'πŸ› FIX', 'πŸš€ RELEASE', 'πŸ¦„ RELEASE', 'πŸ“– DOC', 'βœ… TEST']]
}
};

0 comments on commit 9be6839

Please sign in to comment.