Skip to content

Commit 6b774ef

Browse files
nikkhnKai Cataldo
authored andcommitted
Docs: Add spacing in comments for no-console rule (#12696)
1 parent 7171fca commit 6b774ef

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/rules/no-console.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This rule disallows calls to methods of the `console` object.
1414
Examples of **incorrect** code for this rule:
1515

1616
```js
17-
/*eslint no-console: "error"*/
17+
/* eslint no-console: "error" */
1818

1919
console.log("Log a debug level message.");
2020
console.warn("Log a warn level message.");
@@ -24,7 +24,7 @@ console.error("Log an error level message.");
2424
Examples of **correct** code for this rule:
2525

2626
```js
27-
/*eslint no-console: "error"*/
27+
/* eslint no-console: "error" */
2828

2929
// custom console
3030
Console.log("Hello world!");
@@ -39,7 +39,7 @@ This rule has an object option for exceptions:
3939
Examples of additional **correct** code for this rule with a sample `{ "allow": ["warn", "error"] }` option:
4040

4141
```js
42-
/*eslint no-console: ["error", { allow: ["warn", "error"] }] */
42+
/* eslint no-console: ["error", { allow: ["warn", "error"] }] */
4343

4444
console.warn("Log a warn level message.");
4545
console.error("Log an error level message.");
@@ -52,7 +52,7 @@ If you're using Node.js, however, `console` is used to output information to the
5252
Another case where you might not use this rule is if you want to enforce console calls and not console overwrites. For example:
5353

5454
```js
55-
/*eslint no-console: ["error", { allow: ["warn"] }] */
55+
/* eslint no-console: ["error", { allow: ["warn"] }] */
5656
console.error = function (message) {
5757
throw new Error(message);
5858
};

0 commit comments

Comments
 (0)