Skip to content

ref(scraps): Require explicit React imports - #127532

Merged
TkDodo merged 2 commits into
masterfrom
tkdodo/ref/scraps-explicit-react-imports
Oct 16, 2026
Merged

TkDodo merged 2 commits into
masterfrom
tkdodo/ref/scraps-explicit-react-imports

Conversation

@TkDodo

@TkDodo TkDodo commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Scraps now requires explicit React imports for type and runtime references. This prevents generated declarations such as React.ReactNode from depending on a consumer's global React namespace.

The rule is enabled for Scraps source and colocated tests. Existing uses get type-only imports. Regression tests cover global references, explicit imports, local bindings, and configured globals.

Targets the extraction branch in #127513.

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 15, 2026
@TkDodo
TkDodo added this pull request to stack #127534 October 15, 2026 12:41
Base automatically changed from tkdodo/ref/move-isolated-core-to-scraps to master October 15, 2026 18:16
@linear-code

linear-code Bot commented Oct 15, 2026

Copy link
Copy Markdown

DE-1754

@TkDodo
TkDodo marked this pull request as ready for review October 16, 2026 07:37
@TkDodo
TkDodo requested review from a team as code owners October 16, 2026 07:37
@TkDodo
TkDodo merged commit a6cfb07 into master Oct 16, 2026
81 checks passed
@TkDodo
TkDodo deleted the tkdodo/ref/scraps-explicit-react-imports branch October 16, 2026 07:40

This branch was successfully deployed

1 active deployment
Preview — 54fdb526 Deployed Oct 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants