Skip to content

Commit

Permalink
tools: update capitalized-comments eslint rule
Browse files Browse the repository at this point in the history
This makes sure comments from 10 characters on are validated instead
of 20 characters as lower bound.
The regular expression was also updated to ignore variable
declarations which might happen while commenting out some code during
development.
  • Loading branch information
BridgeAR committed May 13, 2019
1 parent 958ba5e commit 69a0035
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,10 @@ module.exports = {
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'capitalized-comments': ['error', 'always', {
line: {
// Ignore all lines that have less characters than 20 and all lines that
// Ignore all lines that have less characters than 18 and all lines that
// start with something that looks like a variable name or code.
ignorePattern: '.{0,20}$|[a-z]+ ?[0-9A-Z_.(/=:[#-]|std',
// eslint-disable-next-line max-len
ignorePattern: '.{0,18}$|[a-z]+ ?[0-9A-Z_.(/=:[#-]|std|http|ssh|ftp|(let|var|const) [a-z_A-Z0-9]+ =|[b-z] |[a-z]*[0-9].* ',
ignoreInlineComments: true,
ignoreConsecutiveComments: true,
},
Expand Down

0 comments on commit 69a0035

Please sign in to comment.