Skip to content

Commit

Permalink
tools: update capitalized-comments eslint rule
Browse files Browse the repository at this point in the history
The regular expression is updated to ignore variable declarations
which might happen while commenting out some code during development
and adds a couple more exceptions to prevent false negatives.

PR-URL: #27675
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
  • Loading branch information
BridgeAR authored and targos committed May 17, 2019
1 parent 6983a0c commit 47184d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ module.exports = {
line: {
// Ignore all lines that have less characters than 20 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,20}$|[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 47184d1

Please sign in to comment.