Skip to content

Comments

ci(lint): enable no-console rule#16053

Merged
graphite-app[bot] merged 1 commit intomainfrom
11-24-ci_lint_enable_no-console_rule
Nov 24, 2025
Merged

ci(lint): enable no-console rule#16053
graphite-app[bot] merged 1 commit intomainfrom
11-24-ci_lint_enable_no-console_rule

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Nov 24, 2025

Enable no-console rule in our linting setup. Add oxlint-disable comments where we do want to log (in scripts).

@github-actions github-actions bot added A-linter Area - Linter A-parser Area - Parser A-cli Area - CLI A-transformer Area - Transformer / Transpiler A-formatter Area - Formatter labels Nov 24, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-console rule in oxlintrc.json as an error-level rule
  • Add file-level oxlint-disable comments 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.

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Nov 24, 2025
Copy link
Contributor

camc314 commented Nov 24, 2025

Merge activity

Enable `no-console` rule in our linting setup. Add `oxlint-disable` comments where we do want to log (in scripts).
@graphite-app graphite-app bot force-pushed the 11-24-ci_lint_enable_no-console_rule branch from 3b33da5 to 5877752 Compare November 24, 2025 12:06
graphite-app bot pushed a commit that referenced this pull request Nov 24, 2025
After #16013, #16014, and #16053, we can now enable checking for unused `oxlint-disable` comments in our linting setup.
@graphite-app graphite-app bot merged commit 5877752 into main Nov 24, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 11-24-ci_lint_enable_no-console_rule branch November 24, 2025 12:11
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Nov 24, 2025
overlookmotel added a commit that referenced this pull request Nov 24, 2025
After #16013, #16014, and #16053, we can now enable checking for unused `oxlint-disable` comments in our linting setup.
graphite-app bot pushed a commit that referenced this pull request Nov 24, 2025
After #16013, #16014, and #16053, we can now enable checking for unused `oxlint-disable` comments in our linting setup.
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
Enable `no-console` rule in our linting setup. Add `oxlint-disable` comments where we do want to log (in scripts).
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-formatter Area - Formatter A-linter Area - Linter A-parser Area - Parser A-transformer Area - Transformer / Transpiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants