Skip to content

refactor(linter/plugins): simplify debug assertions#16752

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-11-refactor_linter_plugins_simplify_debug_assertions
Dec 11, 2025
Merged

refactor(linter/plugins): simplify debug assertions#16752
graphite-app[bot] merged 1 commit intomainfrom
12-11-refactor_linter_plugins_simplify_debug_assertions

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Dec 11, 2025

Pure refactor. Just shorten the code for some debug assertions. They don't need error messages - if any fail, we can find out what's failing from stack trace.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-linter-plugins Area - Linter JS plugins labels Dec 11, 2025
@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Dec 11, 2025
Copy link
Copy Markdown
Member Author

overlookmotel commented Dec 11, 2025


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.

@overlookmotel overlookmotel marked this pull request as ready for review December 11, 2025 12:58
Copilot AI review requested due to automatic review settings December 11, 2025 12:58
@overlookmotel overlookmotel self-assigned this Dec 11, 2025
Copy link
Copy Markdown
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 refactors debug assertions in apps/oxlint/src-js/plugins/lint.ts to simplify the code by removing error messages, relying on stack traces for debugging instead. The refactoring consolidates debug assertions that previously used verbose if (DEBUG) blocks into concise debugAssert() calls without error messages.

Key Changes:

  • Replaced verbose if (DEBUG) { if (...) throw new Error(...) } blocks with concise debugAssert() calls
  • Moved the consolidated assertions earlier in the function (before setupFileContext call)
  • Added a new assertion to validate optionsIds is an array

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member Author

overlookmotel commented Dec 11, 2025

Merge activity

  • Dec 11, 1:09 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 11, 1:09 PM UTC: overlookmotel added this pull request to the Graphite merge queue.
  • Dec 11, 1:16 PM UTC: The Graphite merge queue removed this pull request due to downstack failures on PR #16751.
  • Dec 11, 2:28 PM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 11, 2:28 PM UTC: overlookmotel added this pull request to the Graphite merge queue.
  • Dec 11, 2:36 PM UTC: Merged by the Graphite merge queue.

@graphite-app graphite-app bot force-pushed the 12-11-build_linter_plugins_add_conformance_build branch from 3c42c4b to e401961 Compare December 11, 2025 13:10
graphite-app bot pushed a commit that referenced this pull request Dec 11, 2025
Pure refactor. Just shorten the code for some debug assertions. They don't need error messages - if any fail, we can find out what's failing from stack trace.
@graphite-app graphite-app bot force-pushed the 12-11-refactor_linter_plugins_simplify_debug_assertions branch from 19c0c0d to dbc083b Compare December 11, 2025 13:11
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 11, 2025
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Dec 11, 2025
Pure refactor. Just shorten the code for some debug assertions. They don't need error messages - if any fail, we can find out what's failing from stack trace.
@graphite-app graphite-app bot force-pushed the 12-11-build_linter_plugins_add_conformance_build branch from e401961 to 5723f3d Compare December 11, 2025 14:29
@graphite-app graphite-app bot force-pushed the 12-11-refactor_linter_plugins_simplify_debug_assertions branch from dbc083b to 5defeed Compare December 11, 2025 14:30
Base automatically changed from 12-11-build_linter_plugins_add_conformance_build to main December 11, 2025 14:36
@graphite-app graphite-app bot merged commit 5defeed into main Dec 11, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 12-11-refactor_linter_plugins_simplify_debug_assertions branch December 11, 2025 14:36
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter A-linter-plugins Area - Linter JS plugins C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants