Skip to content

[Modifications] Replace the CI console grep with a lint rule so violations surface locally #1021

Description

@RUKAYAT-CODER

Overview

The "Check for console.* violations" step in ci.yml is a grep -rn "console\." src/ with six --exclude flags and three --exclude-dir flags. It is brittle (it matches console. inside strings and comments), it disagrees with the ESLint no-console configuration in eslint.config.js (which allows warn and error), and a developer only discovers a violation after pushing. A lint rule gives the same guarantee with AST accuracy and immediate local feedback.

Specifications

Features:

  • The policy expressed once, as an ESLint rule with file-scoped overrides
  • The CI grep removed
  • Violations reported in the editor

Tasks:

  • Configure no-console in eslint.config.js with overrides for src/audit/cli.ts and the logger internals
  • Remove the grep step from ci.yml once lint runs and enforces the rule
  • Reconcile the allow: ['warn', 'error'] setting with the intended zero-tolerance policy
  • Document the logging levels in CONTRIBUTING.md

Impacted Files:

  • eslint.config.js
  • .github/workflows/ci.yml
  • CONTRIBUTING.md

Acceptance Criteria

  • Console violations appear in the editor and in npm run lint
  • CI no longer greps for them
  • The allowed exceptions are explicit and file-scoped

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions