Skip to content

Enable no-console lint rule #33

Description

@tupe12334

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions