Skip to content

Commit

Permalink
ci: consider all linting errors about line length as warnings (#618)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghusse authored Feb 8, 2021
1 parent 263a073 commit 321bed9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,21 @@
// so authorizing 4+5 = 9 characters more on master for the max header length should work
// until we reach PR #99999.

let maxHeaderLength = 100;
let maxLineLength = 100;

const prExtrasChars = 9;

const isPushEvent = process.env.GITHUB_EVENT_NAME === 'push';

if (isPushEvent) {
maxHeaderLength += prExtrasChars;
maxLineLength += prExtrasChars;
}

module.exports = {
extends: ['@commitlint/config-conventional'],
rules: { 'header-max-length': [2, 'always', maxHeaderLength] },
rules: {
'header-max-length': [2, 'always', maxLineLength],
'body-max-line-length': [2, 'always', maxLineLength],
'footer-max-line-length': [2, 'always', maxLineLength],
},
};

0 comments on commit 321bed9

Please sign in to comment.