tools: update capitalized-comments eslint rule

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: https://github.com/nodejs/node/pull/27675
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
This commit is contained in:
Ruben Bridgewater 2019-05-13 14:38:44 +02:00
parent e632b1b7ee
commit 5b26609e5a
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762

View File

@ -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,
},