-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π¦ NEW: Config for emoji log commit lint
- Loading branch information
1 parent
69ad466
commit ba127d5
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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']] | ||
} | ||
}; |