From 6919fbb83f86552b0f49ae749da866e4edc7c46a Mon Sep 17 00:00:00 2001 From: Brandon Mills Date: Sat, 26 Sep 2020 17:23:53 -0400 Subject: [PATCH] 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 --- docs/rules/lines-around-comment.md | 2 +- docs/rules/no-inline-comments.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/rules/lines-around-comment.md b/docs/rules/lines-around-comment.md index 61af5969813..ae543bd837b 100644 --- a/docs/rules/lines-around-comment.md +++ b/docs/rules/lines-around-comment.md @@ -437,7 +437,7 @@ const [ ### ignorePattern -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. +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). Examples of **correct** code for the `ignorePattern` option: diff --git a/docs/rules/no-inline-comments.md b/docs/rules/no-inline-comments.md index 8a4baf68726..237b2485a72 100644 --- a/docs/rules/no-inline-comments.md +++ b/docs/rules/no-inline-comments.md @@ -92,7 +92,7 @@ var quux = ( ### ignorePattern -A regular expression can be provided to make this rule ignore specific comments. +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). Examples of **correct** code for the `ignorePattern` option: