ci(lint): enable no-console rule#16053
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull request overview
This PR enforces the no-console linting rule across the codebase to prevent accidental console statements in production code, while explicitly allowing console usage in build scripts and utilities through oxlint disable comments.
Key Changes:
- Enable
no-consolerule inoxlintrc.jsonas an error-level rule - Add file-level
oxlint-disablecomments to script files that use console throughout (main.mjs, build scripts, GitHub Actions scripts) - Add line-level disable comments for specific console statements in generated/utility scripts
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| oxlintrc.json | Adds no-console: error rule to enforce no console usage in production code |
| tasks/transform_conformance/reporter.mjs | File-level disable for test reporter that logs test results |
| tasks/lint_rules/src/oxlint-rules.mjs | Line-level disable for diagnostic logging when rule not found |
| tasks/lint_rules/src/main.mjs | File-level disable for CLI script that outputs to console |
| npm/oxlint/scripts/generate-packages.js | File-level disable for build script that logs generation progress |
| npm/oxfmt/scripts/generate-packages.js | File-level disable for build script that logs generation progress |
| napi/parser/scripts/visitor-keys.js | Line-level disable for script output |
| napi/parser/example.js | Line-level disable added to existing disable comment |
| crates/oxc_traverse/scripts/build.mjs | Line-level disable for build progress logging |
| apps/oxlint/scripts/build.ts | File-level disable for build script that logs build steps |
| apps/oxfmt/scripts/build.js | File-level disable for build script that logs build steps |
| .github/scripts/utils.js | File-level disable for GitHub Actions utility functions |
| .github/scripts/get-changed-files.js | File-level disable for GitHub Actions script |
| .github/scripts/generate-benchmark-matrix.js | File-level disable for GitHub Actions script |
| .github/scripts/check-conformance-changes.js | File-level disable for GitHub Actions script |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge activity
|
Enable `no-console` rule in our linting setup. Add `oxlint-disable` comments where we do want to log (in scripts).
3b33da5 to
5877752
Compare
Enable `no-console` rule in our linting setup. Add `oxlint-disable` comments where we do want to log (in scripts).
…6015) After oxc-project#16013, oxc-project#16014, and oxc-project#16053, we can now enable checking for unused `oxlint-disable` comments in our linting setup.

Enable
no-consolerule in our linting setup. Addoxlint-disablecomments where we do want to log (in scripts).