Skip to content
Permalink
Browse files

Docs: Add spacing in comments for no-console rule (#12696)

  • Loading branch information
nikkhn authored and kaicataldo committed Dec 20, 2019
1 parent 7171fca commit 6b774ef0d849ccf5c1127b25e1fe7c3e438d586b
Showing with 4 additions and 4 deletions.
  1. +4 −4 docs/rules/no-console.md
@@ -14,7 +14,7 @@ This rule disallows calls to methods of the `console` object.
Examples of **incorrect** code for this rule:

```js
/*eslint no-console: "error"*/
/* eslint no-console: "error" */
console.log("Log a debug level message.");
console.warn("Log a warn level message.");
@@ -24,7 +24,7 @@ console.error("Log an error level message.");
Examples of **correct** code for this rule:

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

```js
/*eslint no-console: ["error", { allow: ["warn", "error"] }] */
/* eslint no-console: ["error", { allow: ["warn", "error"] }] */
console.warn("Log a warn level message.");
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
Another case where you might not use this rule is if you want to enforce console calls and not console overwrites. For example:

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

0 comments on commit 6b774ef

Please sign in to comment.
You can’t perform that action at this time.