Skip to content

Commit 243954a

Browse files
authored
Make capitalized-comments ignore most commented code (#285)
1 parent 4728476 commit 243954a

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

.changeset/thick-walls-sort.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cloudfour/eslint-plugin': minor
3+
---
4+
5+
Make capitalized-comments ignore most commented code

src/config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,17 @@ module.exports.configs = {
135135
'prefer-template': 'error',
136136
'no-param-reassign': 'off', // We don't use `arguments`, and assigning to parameters can be useful
137137
'no-promise-executor-return': 'off', // Allow implicit return in promise executor
138+
'capitalized-comments': [
139+
'error',
140+
'always',
141+
{
142+
ignorePattern:
143+
'pragma|ignore|prettier-ignore|webpack\\w+:|c8|return|const|let|var|await|function|console',
144+
ignoreInlineComments: true,
145+
ignoreConsecutiveComments: true,
146+
},
147+
],
148+
138149
'node/no-unsupported-features/es-syntax': 'off', // Does not account for transpilation
139150
'node/no-unpublished-require': 'off', // Does not account for "build" scripts
140151
'node/shebang': 'off', // Tons of false positives

0 commit comments

Comments
 (0)