test(linter): allow disabling optimizations#13735
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. |
CodSpeed Instrumentation Performance ReportMerging #13735 will not alter performanceComparing Summary
Footnotes |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a debugging capability to disable runtime optimizations in the linter for testing and debugging purposes. The change introduces a new field to control whether node type optimizations are applied during linting.
- Adds a new
disable_node_type_optimizationfield to theLinterstruct - Implements a builder method
with_disabled_optimizationsto control this setting - Integrates environment variable
OXLINT_NO_OPTIMIZEto enable the feature via CLI
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| crates/oxc_linter/src/lib.rs | Adds disable optimization field and logic to bypass node type optimization when disabled |
| apps/oxlint/src/lint.rs | Integrates environment variable check to enable optimization disabling in the CLI tool |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Allows disabling the new node type skipping optimizations for testing purposes. If enabled, all rules will be treated as if they could run on any node type, so all rules will run.