diff --git a/docs/rules/spaced-comment.md b/docs/rules/spaced-comment.md index 3d0a5d9a90b..5a885f9821b 100644 --- a/docs/rules/spaced-comment.md +++ b/docs/rules/spaced-comment.md @@ -21,7 +21,7 @@ The rule takes two options. * This rule can also take a 2nd option, an object with any of the following keys: `"exceptions"` and `"markers"`. - * The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule. + * The `"exceptions"` value is an array of string patterns which are considered exceptions to the rule. The rule will not warn when the pattern starts from the beginning of the comment and repeats until the end of the line or `*/` if the comment is a single line comment. Please note that exceptions are ignored if the first argument is `"never"`. ``` @@ -175,6 +175,12 @@ Examples of **incorrect** code for this rule with the `"always"` option combined /*-+-+-+-+-+-+-+*/ ``` +```js +/* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["*"] } }] */ + +/******** COMMENT *******/ +``` + Examples of **correct** code for this rule with the `"always"` option combined with `"exceptions"`: ```js @@ -221,6 +227,16 @@ Examples of **correct** code for this rule with the `"always"` option combined w /*-+-+-+-+-+-+-+*/ ``` +```js +/* eslint spaced-comment: ["error", "always", { "block": { "exceptions": ["*"] } }] */ + +/***************/ + +/******** +COMMENT +*******/ +``` + ### markers Examples of **incorrect** code for this rule with the `"always"` option combined with `"markers"`: