docs(transformer): clarify jsx.pure option would affect JSX elements#15376
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 updates documentation comments to more accurately describe the behavior of the @babel/plugin-transform-react-pure-annotations plugin. The update clarifies that the plugin marks both JSX elements and top-level React method calls as pure, rather than only top-level React method calls.
- Updated documentation to include "JSX elements" in the description of what gets marked as pure
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| napi/transform/src/transformer.rs | Updated doc comment for JsxOptions to clarify pure annotation scope |
| napi/transform/index.d.ts | Updated TypeScript documentation comment to match Rust implementation |
| crates/oxc_transformer/src/jsx/options.rs | Updated doc comment in core transformer options to reflect accurate behavior |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CodSpeed Performance ReportMerging #15376 will not alter performanceComparing Summary
Footnotes
|
Merge activity
|
#15376) Update the doc comment as `jsx.pure` option also affects JSX elements. https://github.com/oxc-project/oxc/blob/b1d3e005def3fe1899e77d2ace0c0584c9b22f80/crates/oxc_transformer/src/jsx/jsx_impl.rs#L779 I'll update the docs after this PR is merged.
1f27af7 to
4b904b1
Compare

Update the doc comment as
jsx.pureoption also affects JSX elements.oxc/crates/oxc_transformer/src/jsx/jsx_impl.rs
Line 779 in b1d3e00
I'll update the docs after this PR is merged.