noConsoleLog (since v12.1.0)
Disallow the use of console.log
Examples
Invalid
console.log()
nursery/noConsoleLog.js:1:1 lint/nursery/noConsoleLog ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Don't use console.log
> 1 │ console.log()
│ ^^^^^^^^^^^^^
2 │
ℹ console.log is usually a tool for debugging and you don't want to have that in production.
Valid
console.info("info");
console.warn("warn");
console.error("error");
console.assert(true);
console.table(["foo", "bar"]);
const console = { log() {} };
console.log();