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
Overview
The "Check for console.* violations" step in
ci.ymlis agrep -rn "console\." src/with six--excludeflags and three--exclude-dirflags. It is brittle (it matchesconsole.inside strings and comments), it disagrees with the ESLintno-consoleconfiguration ineslint.config.js(which allowswarnanderror), 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:
Tasks:
no-consoleineslint.config.jswith overrides forsrc/audit/cli.tsand the logger internalsci.ymlonce lint runs and enforces the ruleallow: ['warn', 'error']setting with the intended zero-tolerance policyCONTRIBUTING.mdImpacted Files:
eslint.config.js.github/workflows/ci.ymlCONTRIBUTING.mdAcceptance Criteria
npm run lint