Skip to content

fix(react): align jsx-fragments with upstream - #2140

Merged
fansenze merged 2 commits into
mainfrom
fix/react-jsx-fragments-parity
Sep 16, 2026
Merged

fansenze merged 2 commits into
mainfrom
fix/react-jsx-fragments-parity

Conversation

@elecmonkey

@elecmonkey elecmonkey commented Sep 10, 2026

Copy link
Copy Markdown
Member

Summary

  • honor file-level @jsx pragmas when matching and expanding React fragments
  • resolve local fragment aliases through the ESLint-compatible scope model in both source-only and type-aware linting
  • preserve upstream first-definition semantics for redeclared fragment aliases
  • prevent shadowed bindings without initializers from crashing the linter
  • prevent shadowed or unrelated component bindings from being autofixed into fragment shorthand
  • add Go and JS regression coverage for custom JSX runtimes, source-only scope resolution, shadowing, and redeclarations

@elecmonkey
elecmonkey marked this pull request as ready for review September 11, 2026 02:56

@fansenze fansenze 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.

Found two regressions in source-only linting. Reproductions and suggested fixes are inline.

Comment thread internal/plugins/react/rules/jsx_fragments/jsx_fragments.go Outdated
Comment thread internal/plugins/react/rules/jsx_fragments/jsx_fragments.go Outdated
@elecmonkey
elecmonkey requested a review from fansenze September 13, 2026 18:24
@fansenze

Copy link
Copy Markdown
Contributor

@elecmonkey Please resolve the merge conflicts. Thanks!

@elecmonkey
elecmonkey force-pushed the fix/react-jsx-fragments-parity branch from 3d6b244 to 76b502e Compare September 16, 2026 04:27
@elecmonkey

Copy link
Copy Markdown
Member Author

@elecmonkey Please resolve the merge conflicts. Thanks!

resolved, thanks

@fansenze
fansenze merged commit 2d4cbe4 into main Sep 16, 2026
15 checks passed
@fansenze
fansenze deleted the fix/react-jsx-fragments-parity branch September 16, 2026 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants