Improve React Compiler diagnostics with actionable help and cause-oriented labels. Preserve-memoization and recursive-initialization diagnostics previously spanned entire callbacks; they now keep codeframes compact while refs and `try`/`finally` show related locations.
Validated with React Compiler and React linter suites, Clippy, `just ready`, and the 24-rule VS Code ecosystem audit.
AI-assisted: Codex was used to implement and validate this change. I reviewed and take responsibility for the result.
Bail out when JSX `ref` values are loaded through properties, matching React Compiler and preserving getter and live-binding evaluation semantics.
The validator previously stopped temporary tracking for every property result inferred as ref-like instead of only stopping for `ref.current`.
Validation: `cargo test -p oxc_react_compiler` and `just ready`.
AI assistance: Codex was used to investigate and prepare this change; the contributor remains responsible for reviewing it before merge.
Queue JSX-outlined components back through the normal `process_fn` pipeline, matching Babel's `Program.ts`. Oxc rebuilds immutable semantics once per FIFO generation and preserves Babel's outlined declaration order.
Validated against the React Compiler fixture suite, Babel output, and `just ready`.
AI-assisted; reviewed and validated by the contributor.
Remove the inactive `react/config` rule and its generated metadata. Oxlint uses fixed, valid React Compiler options, so the rule cannot produce actionable diagnostics.
AI-assisted: Codex was used to implement and validate this change.
Ports Babel's identifier consistency invariant using Oxc's canonical identifier arena and runs it at every equivalent pipeline point.
Validated with the React compiler fixture corpus and clippy.
AI-assisted: Codex was used to implement and verify this change.
Use direct integer formatting for plain graphical snippet coordinates
and line numbers.
Criterion shows 4-14% faster graphical rendering across the covered
cases.
Created with AI assistance.
<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
Keep diagnostic titles inline and bypass color formatting when the
active style is plain, reducing focused graphical-rendering time by
5–9%.
AI assistance: Codex was used. The contributor remains responsible for
this change.
<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a></sub>
Keep common graphical-rendering buffers inline and add a focused
benchmark for regressions.
AI assistance: Codex was used. The contributor remains responsible for
this change.
<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a></sub>
Batch graphical diagnostics so reports sharing a source reuse line
indexing, and route oxlint diagnostic batches through the new API.
AI assistance: Codex was used. The contributor remains responsible for
this change.
<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a></sub>
Ports Babel's terminal-predecessor invariant and runs it before HIR scope dependency propagation. Keeps terminal successor traversal inline to avoid per-edge heap allocations.
AI-assisted: Codex was used to implement and verify this change.
Ports React Compiler's terminal-successor invariant and runs it after CFG-rewriting passes. Uses the existing upstream `for-return.js` fixture for regression coverage.
AI-assisted: Codex was used to implement and verify this change.
Preserve named function expression names when the private name is unreferenced. This matches React Compiler lowering and avoids changing observable `Function.name` values.
Validated with `just ready`.
AI-assisted.
Improve React Compiler diagnostics with focused primary spans and related labels for declarations, dependencies, effects, nested functions, dynamic Hooks, and transitive ref access. This avoids full-function highlights and fixes zero-width arrow labels when lowered parameter spans are missing.
Validation: `env -u NO_COLOR just ready`.
AI-generated with Codex; reviewed and validated by the contributor.
Fix destructured function and rest parameters that become context variables by lowering them through temporaries before `StoreContext`. This avoids inconsistent `Destructure`/context HIR and compiles supported components correctly.
Validated with `just ready` and runtime equivalence checks against React 19.2.1's compiler runtime.
AI usage: Implemented with assistance from OpenAI Codex.
Fixes#25705
---
JS formatter drops `;` (`EmptyStatement`) in a statement list.
However, this raises a question: how are the surrounding comments handled when it is dropped?
This happens because when the comment cursor retrieves that information from the `span`s of the preceding and following nodes, the `EmptyStatement`, which no longer exists, was the one reporting that position.
Splits the experimental `react/react-compiler` rule into 24 category-specific rules matching `eslint-plugin-react-hooks` v7.
- Runs React Compiler once per file and routes structured diagnostics to each enabled rule.
- Removes `react/react-compiler` and `reportAllBailouts`, with rules categorized by user-facing lint intent.
- Adds per-rule documentation and deduplicates shared React lint URLs.
- Preserves standardized compiler diagnostics while reporting each finding under its Oxlint rule name.
Breaking change: configurations using `react/react-compiler` must migrate to the category-specific rules.
Written with Claude Code and Codex.
Standardize React Compiler diagnostics with concise titles, primary labels, actionable help, notes, structured categories, and official guidance links.
Preserve React guidance when diagnostics are surfaced through Oxlint, and refresh affected snapshots.
AI-assisted; reviewed and validated by the contributor.
Rejects initialized `let` and `const` declarations in `for...in` during parsing while preserving Annex B's non-strict `var` form.
Adds misc coverage for valid and invalid initializer forms.
Verified with `just ready` and parser conformance.
Closes#25149.
AI-assisted.
Centralizes React compiler diagnostics in explicit `#[cold]` functions and removes the `[ReactCompiler]` prefix, keeping diagnostic formatting off hot paths. Updates related NAPI expectations.
AI assistance was used.
Preserve tagged-template call, aliasing, and mutation effects instead of assuming no-substitution tags are primitive or pure.
Execute opaque or effectful tags unconditionally while retaining memoization only when a configured signature proves a read-only pure call and safe return.
AI-assisted investigation and implementation; reviewed and understood by the contributor.
Quoted constructor methods bypassed the AST-based constructor validation. Validate type parameters after resolving the method key, preserving the AST shape.
Validation: `just ready`, parser conformance, and allocation checks.
Closes#25692.
AI-assisted with Codex.
Preserve inline TypeScript enums as opaque pass-through HIR nodes, matching upstream React Compiler behavior. Apply Oxc-specific raw AST reference renaming, and skip compilation when passthrough would hide nested captures or flatten block-local bindings.
AI-assisted: Codex was used to implement and validate this change.
Adds transformer integration coverage for Baseline Browserslist queries and verifies feature-specific lowering across dated and year-based targets.
Created with AI assistance.
Match the public validation defaults from babel-plugin-react-compiler 1.0 while retaining explicit opt-in for newer validations.
Validated with fixture snapshots and `just ready`.
AI-assisted investigation and implementation; reviewed and understood by the contributor.
React Compiler's JSX reconstruction preserved the HIR identifier expression kind, causing compiler-generated lowercase aliases such as `navTitle` to lower as variable references. Classify reconstructed tags by their emitted JSX spelling while preserving underscore-prefixed component references.
Validation: `cargo test -p oxc_react_compiler`, `cargo clippy -p oxc_react_compiler --all-targets -- -D warnings`, and the transform-react NAPI suite.
AI assistance: OpenAI Codex was used to investigate, implement, and validate this change.
## Summary
- retain the innermost JSX-returning arrow node when detecting HOF components
- report react/display-name on the anonymous inner component instead of the outer HOC factory
- cover the TypeScript curried-HOC reproduction and its disable-next-line behavior
Closes#25618.
## Summary
- report default imports whose local name conflicts with a named local export
- preserve the same-symbol re-export exemption from eslint-plugin-import
- keep matching disable directives live under unused-directive reporting
Fixes#25624
## Summary
- report custom Hooks inside try/catch blocks as conditional
- preserve the same-CFG fast path for ordinary top-level Hooks
- add focused regression coverage for the reported first-operation-in-try case
Closes#25631
## Summary
- default `allowIndirect` to `false`, matching ESLint's `no-eval` behavior
- report bare global `eval` references and declared global-object member access by default
- avoid duplicate diagnostics for direct global calls while preserving `allowIndirect: true`
- add regression coverage, including an ESLint disable-next-line directive
Closes#25619.
## Summary
- treat destructuring initializers as whole-object dependencies
- avoid reporting narrower declared paths as unnecessary while their reactive ancestor is missing
- preserve unnecessary-dependency diagnostics for stable ancestors such as state setters
Fixes#25621
## Summary
- report a bare underscore parameter when no args ignore pattern is configured
- preserve the optimized underscore-prefix behavior for explicit argsIgnorePattern configuration
- update focused rule coverage and generated documentation
Closes#25626
## Summary
- walk through nested arrow callbacks when resolving the enclosing stateless component
- preserve ordinary function boundaries that introduce their own this binding
- add regression coverage for the reported JSX ref callback and unused disable directives
Closes#25615
## Summary
- run typescript/no-var-requires on JavaScript files
- match typescript-eslint behavior and prevent false unused-disable diagnostics
Fixes#25623.
## Summary
- align the skipComments default with ESLint
- report irregular whitespace in line and block comments by default
- preserve the skipComments: true opt-out
- verify suppressed comment diagnostics count disable directives as used
- regenerate the published configuration schema
Fixes#25616.
## Summary
- flag declaration-level TypeScript type-only named default imports
- preserve inline type specifier behavior to match eslint-plugin-import
- add regression and disable-directive coverage
- regenerate rule dispatch and timing metadata
Closes#25613
## Summary
- traverse member-expression chains across computed accesses before checking for `this.state`
- add regression coverage for computed assignment and update targets
Fixes#25625
## Summary
- anchor max-classes-per-file diagnostics at the first program token to match ESLint behavior
- update diagnostic snapshots to assert the program-level location
- preserve disable-next-line behavior for top-of-file directives
Fixes#25629.
## Summary
- treat parenthesized assignment expressions as direct children in the three contexts covered by ESLint's no-multi-assign rule
- add regression coverage for the reported TypeScript declarator initializers, class fields, assignment right-hand sides, and disable directives
Fixes#25617.