Skip to content

fix(noUnknownAttribute): recognize React 19 transition events - #12089

Merged
dyc3 merged 2 commits into
biomejs:mainfrom
ternaus:codex/react19-transition-events
Oct 2, 2026
Merged

dyc3 merged 2 commits into
biomejs:mainfrom
ternaus:codex/react19-transition-events

Conversation

@ternaus

@ternaus ternaus commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #12088.

noUnknownAttribute reports valid React 19 transition event handlers as unknown. Accept onTransitionCancel, 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

  • Regression fails without the fix; all 20 no_unknown_attribute spec 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 base 8cfb219c02; its snapshot is unchanged in this PR.
  • just f and workspace just l pass.

Docs

Rule rustdoc describes the React 19 manifest requirement. A patch changeset links the issue.

Copilot AI balanced review requested due to automatic review settings October 2, 2026 18:30
@changeset-bot

changeset-bot Bot commented Oct 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 668b65c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-win32-x64 Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/wasm-web Patch
@biomejs/backend-jsonrpc Patch

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

@agentscanapp

agentscanapp Bot commented Oct 2, 2026

Copy link
Copy Markdown

A maintainer will take a look as soon as they can. In the meantime, please make sure that:

  • the description follows our PR template
  • any related issues are linked
  • existing tests still pass

@github-actions github-actions Bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Oct 2, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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 configuration

Configuration used: Repository: biomejs/biome/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 180f79b5-09bd-44a1-b23f-20bda7be006b

📥 Commits

Reviewing files that changed from the base of the PR and between 4c1612b and 668b65c.

⛔ Files ignored due to path filters (3)
  • crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_18_transition_events/invalid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_19_transition_events/invalid.jsx.snap is excluded by !**/*.snap and included by **
  • crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_19_transition_events/valid.jsx.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (8)
  • .changeset/swift-phones-lead.md
  • crates/biome_js_analyze/src/lint/suspicious/no_unknown_attribute.rs
  • crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_18_transition_events/invalid.jsx
  • crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_18_transition_events/invalid.package.json
  • crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_19_transition_events/invalid.jsx
  • crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_19_transition_events/invalid.package.json
  • crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_19_transition_events/valid.jsx
  • crates/biome_js_analyze/tests/specs/suspicious/noUnknownAttribute/react_19_transition_events/valid.package.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


Walkthrough

The 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 668b6

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)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: recognising React 19 transition events in noUnknownAttribute.
Description check ✅ Passed The description directly explains the React 19 event-handler fix, retained diagnostics, implementation, tests, and documentation.
Linked Issues check ✅ Passed The PR meets the coding requirements in issue #12088. no_unknown_attribute.rs adds the six transition event names and their capture variants to the React 19+ case-insensitive lookup. The React 19 va…
Out of Scope Changes check ✅ Passed The changes stay within issue #12088. The rule update, React 18 and React 19 fixtures, test manifests, rustdoc, and patch changeset all support the requested recognition and regression coverage. No un…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@codspeed

codspeed Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 113 untouched benchmarks
⏩ 298 skipped benchmarks1


Comparing ternaus:codex/react19-transition-events (668b65c) with main (8cfb219)

Open in CodSpeed

Footnotes

  1. 298 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@dyc3 dyc3 left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine. There's some other refactors that should happen in this rule that I'll handle. Thank you.

@dyc3
dyc3 merged commit dba2a37 into biomejs:main Oct 2, 2026
36 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

noUnknownAttribute reports valid React 19 transition event handlers

3 participants