Repository navigation
fix(noUnknownAttribute): recognize React 19 transition events - #12089
Conversation
🦋 Changeset detectedLatest commit: 668b65c The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
A maintainer will take a look as soon as they can. In the meantime, please make sure that:
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The version-gated implementation matches React 19 behavior and has focused positive and negative regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Updates noUnknownAttribute to recognize React 19 transition event handlers while preserving diagnostics for earlier React versions and invalid names.
Changes:
- Adds version-gated transition handler recognition.
- Adds React 18/19 regression fixtures and snapshots.
- Updates rule documentation and release notes.
| File | Description |
|---|---|
.changeset/swift-phones-lead.md |
Documents the user-facing bug fix. |
crates/biome_js_analyze/src/lint/suspicious/no_unknown_attribute.rs |
Adds React 19 transition props and documentation. |
crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_18_transition_events/invalid.package.json |
Configures the React 18 test. |
crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_18_transition_events/invalid.jsx |
Tests rejection under React 18. |
crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_18_transition_events/invalid.jsx.snap |
Records React 18 diagnostics. |
crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_19_transition_events/valid.package.json |
Configures the valid React 19 test. |
crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_19_transition_events/valid.jsx |
Tests accepted React 19 handlers. |
crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_19_transition_events/valid.jsx.snap |
Records diagnostic-free output. |
crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_19_transition_events/invalid.package.json |
Configures invalid React 19 cases. |
crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_19_transition_events/invalid.jsx |
Tests misspellings and unsupported handlers. |
crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_19_transition_events/invalid.jsx.snap |
Records expected React 19 diagnostics. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: biomejs/biome/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (8)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe rule’s React 19+ lookup now recognises six transition event handlers, including capture variants. New fixtures cover React 18 and React 19 dependency versions, with valid and invalid JSX attributes. A patch changeset describes the update. Priority: ⬇️ Low Change: Bug fix · Severity of issue fixed: Low Merge Risk: ⚪ Minimal · up to The change recognizes the React 19 transition handlers while retaining diagnostics for malformed spellings and React 18. No concrete merge-blocking issue remains. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
Summary
Fixes #12088.
noUnknownAttributereports valid React 19 transition event handlers as unknown. AcceptonTransitionCancel,onTransitionRun,onTransitionStart, and their capture variants when the React dependency range permits React 19 or later. React 18, misspellings, and unsupported animation-cancel handlers retain diagnostics.Implementation, fixtures, documentation, and this description were prepared with Codex.
Test Plan
no_unknown_attributespec tests pass.INSTA_UPDATE=no cargo test -p biome_js_analyze -- --skip specs::correctness::no_unused_variables::invalid_vue_slot_typed_props_vue: 3,552 tests passed, three ignored, one filtered out. The excluded Vue snapshot has a whitespace mismatch that also fails on the unmodified upstream base8cfb219c02; its snapshot is unchanged in this PR.just fand workspacejust lpass.Docs
Rule rustdoc describes the React 19 manifest requirement. A patch changeset links the issue.