Skip to content

Commit 6919fbb

Browse files
authored
Docs: Clarify that ignorePattern should be a string (refs #13029) (#13718)
* Docs: Clarify that ignorePattern should be a string (refs #13029) * Clarify ignorePattern option adds to default patterns
1 parent 07d9bea commit 6919fbb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/rules/lines-around-comment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ const [
437437

438438
### ignorePattern
439439

440-
By default this rule ignores comments starting with the following words: `eslint`, `jshint`, `jslint`, `istanbul`, `global`, `exported`, `jscs`. An alternative regular expression can be provided.
440+
By default this rule ignores comments starting with the following words: `eslint`, `jshint`, `jslint`, `istanbul`, `global`, `exported`, `jscs`. To ignore more comments in addition to the defaults, set the `ignorePattern` option to a string pattern that will be passed to the [`RegExp` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp).
441441

442442
Examples of **correct** code for the `ignorePattern` option:
443443

docs/rules/no-inline-comments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ var quux = (
9292

9393
### ignorePattern
9494

95-
A regular expression can be provided to make this rule ignore specific comments.
95+
To make this rule ignore specific comments, set the `ignorePattern` option to a string pattern that will be passed to the [`RegExp` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp).
9696

9797
Examples of **correct** code for the `ignorePattern` option:
9898

0 commit comments

Comments
 (0)