From 6b774ef0d849ccf5c1127b25e1fe7c3e438d586b Mon Sep 17 00:00:00 2001 From: Nikki Nikkhoui Date: Fri, 20 Dec 2019 11:56:04 -0800 Subject: [PATCH] Docs: Add spacing in comments for no-console rule (#12696) --- docs/rules/no-console.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/rules/no-console.md b/docs/rules/no-console.md index bc163b93755..f2fb79ec421 100644 --- a/docs/rules/no-console.md +++ b/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); };