refactor(linter/plugins): simplify debug assertions#16752
refactor(linter/plugins): simplify debug assertions#16752graphite-app[bot] merged 1 commit intomainfrom
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 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 concisedebugAssert()calls - Moved the consolidated assertions earlier in the function (before
setupFileContextcall) - Added a new assertion to validate
optionsIdsis an array
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merge activity
|
3c42c4b to
e401961
Compare
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.
19c0c0d to
dbc083b
Compare
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.
e401961 to
5723f3d
Compare
dbc083b to
5defeed
Compare

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.