noConsole (since v1.6.0)
Diagnostic Category: lint/nursery/noConsole
Sources:
- Same as:
no-console
Disallow the use of console
.
Examples
Section titled ExamplesInvalid
Section titled Invalidcode-block.js:1:1 lint/nursery/noConsole FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Don't use console
> 1 │ console.error('hello world')
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2 │
ℹ Usage of console is disallowed.
ℹ Unsafe fix: Remove console
1 │ console.error('hello·world')
│ ----------------------------