Summary
Enable the no-console ESLint rule (allowing console.warn / console.error) in the shared lint config so stray console.log debugging statements cannot ship to production.
What the rule catches
no-console flags calls to console methods. Configured as:
"no-console": ["error", { "allow": ["warn", "error"] }]
it errors on console.log, console.debug, console.info, console.table, etc., while still permitting intentional diagnostics via console.warn and console.error.
Why it improves code quality
- No debug leftovers in prod.
console.log lines added while debugging routinely slip into commits. On a public landing site they leak to every visitor's devtools and add noise.
- Forces intent. Output that should exist is written through
console.warn/console.error, making real diagnostics distinguishable from forgotten debugging.
- Zero current cost. The rule currently reports 0 violations across
src/, so enabling it is a pure guardrail with no code churn.
Scope
- One rule, error level,
warn/error allowed.
- No other rules touched.
This issue was opened by the "Add lint rule → issue + PR (owned repos + my orgs) → Slack" routine of moadim, on behalf of @tupe12334.
Summary
Enable the
no-consoleESLint rule (allowingconsole.warn/console.error) in the shared lint config so strayconsole.logdebugging statements cannot ship to production.What the rule catches
no-consoleflags calls toconsolemethods. Configured as:it errors on
console.log,console.debug,console.info,console.table, etc., while still permitting intentional diagnostics viaconsole.warnandconsole.error.Why it improves code quality
console.loglines added while debugging routinely slip into commits. On a public landing site they leak to every visitor's devtools and add noise.console.warn/console.error, making real diagnostics distinguishable from forgotten debugging.src/, so enabling it is a pure guardrail with no code churn.Scope
warn/errorallowed.This issue was opened by the "Add lint rule → issue + PR (owned repos + my orgs) → Slack" routine of moadim, on behalf of @tupe12334.