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: nodejs#27675
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
  • Loading branch information
BridgeAR committed May 16, 2019
1 parent e632b1b commit 5b26609
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 5b26609

Please sign in to comment.