Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: Add spacing in comments for no-console rules #12696

Merged
merged 1 commit into from Dec 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/rules/no-console.md
Expand Up @@ -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.");
Expand All @@ -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!");
Expand All @@ -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.");
Expand All @@ -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);
};
Expand Down