Skip to content

Commit

Permalink
Docs: update exception details to cover newline issue (fixes eslint#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
anikethsaha committed Mar 31, 2020
1 parent 438dcbb commit 6735b72
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/rules/spaced-comment.md
Expand Up @@ -22,7 +22,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.
Please note that exceptions are ignored if the first argument is `"never"`.
Please note that exceptions are ignored if the first argument is `"never"`. It starts from the beginning of the line and checks untill the end of line or `*/` if its in same line

```
"spaced-comment": ["error", "always", { "exceptions": ["-", "+"] }]
Expand Down Expand Up @@ -175,6 +175,12 @@ Examples of **incorrect** code for this rule with the `"always"` option combined
/*-+-+-+-+-+-+-+*/
```

```js
/* eslint spaced-comment: ["error", "always", { "line": { "exceptions": ["*"] } }] */

/******** COMMENT *******/
```

Examples of **correct** code for this rule with the `"always"` option combined with `"exceptions"`:

```js
Expand Down

0 comments on commit 6735b72

Please sign in to comment.