mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
8c4552dfa6
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.
19 lines
848 B
Markdown
19 lines
848 B
Markdown
# Oxc React Compiler
|
|
|
|
oxc integration for the Rust port of the [React Compiler](https://github.com/react/react/tree/main/compiler).
|
|
|
|
## Overview
|
|
|
|
This crate owns the oxc ↔ `react_compiler_ast` (Babel) conversion layer and runs the React
|
|
Compiler over an oxc AST, memoizing React components and hooks. The compiler _core_ crates are
|
|
front-end agnostic (they never depend on oxc), so they are consumed from crates.io as a published
|
|
fork; the AST and scope conversion lives here, written against the live oxc AST.
|
|
|
|
## API
|
|
|
|
- `compile` — run the compiler and return a `CompileResult` with the rewrite to apply
|
|
(via `CompileOutput::transform`) plus diagnostics.
|
|
- `lint` — report diagnostics only, without emitting code; each finding is tagged with its
|
|
`ErrorCategory`.
|
|
- `PluginOptions` — configure which functions are compiled and how.
|