-
Notifications
You must be signed in to change notification settings - Fork 8
Linter Rules
Leonardo Ascione edited this page Mar 1, 2019
·
4 revisions
Default configuration is provided as blueprint:
{
rules: {
"emoji-from-type": true,
"emoji-known": true,
"emoji-require": true,
"spaces-between": true,
"header-full-stop": false,
"header-max-length": false,
"subject-case": [2, { case: "sentence-case" }],
"subject-require": true,
"body-leading-blank": true
}
}
- Rules may be enabled as errors setting them to
true
(equivalent to2
) - Rules may be enabled as warnings (logs but do not throw) using
[1, { arg: ... } ]
. If no args are needed,[1]
is sufficient. - Rules may be disabled entirely (ignore) using
false
(equivalent to0
Replaces conventional commit types (i.e. fix
) with emojis.
"emoji-from-type": true
Ensures emoji is provided.
"emoji-require": true
Ensures emoji is an allowed one, given the emoji
configuration.
"emoji-known": true,
Force or disable full stop for the header.
Args:
-
never
:true
to enforce missing full stop.
"header-full-stop": [2, { never: true }]
Limits max header length.
Args:
-
max
:Number
maximum header length in characters
"header-max-length": [2, { max: 72 }]
Only one space allowed between Emoji and Subject.
"spaces-between": true
Ensures a Subject is added.
"subject-require": true
Allow only defined case in Subject, i.e. if sentence-case
is set and message is 🛠 my Improvement
, commit will be rewritten as 🛠 My improvement
.
Args:
-
case
: May be one ofsentence-case
,lower-case
,upper-case
"subject-case": [2, { case: 'lower-case' }]