@@ -14,7 +14,7 @@ This rule disallows calls to methods of the `console` object.
1414Examples of ** incorrect** code for this rule:
1515
1616``` js
17- /* eslint no-console: "error"*/
17+ /* eslint no-console: "error" */
1818
1919console .log (" Log a debug level message." );
2020console .warn (" Log a warn level message." );
@@ -24,7 +24,7 @@ console.error("Log an error level message.");
2424Examples of ** correct** code for this rule:
2525
2626``` js
27- /* eslint no-console: "error"*/
27+ /* eslint no-console: "error" */
2828
2929// custom console
3030Console .log (" Hello world!" );
@@ -39,7 +39,7 @@ This rule has an object option for exceptions:
3939Examples 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
4444console .warn (" Log a warn level message." );
4545console .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
5252Another 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"] }] */
5656console .error = function (message ) {
5757 throw new Error (message);
5858};
0 commit comments