Skip to content

chore(✂️): Check Scraps and icons workspaces - #127008

Merged
TkDodo merged 2 commits into
masterfrom
tkdodo/ref/check-knip-workspaces
Oct 9, 2026
Merged

TkDodo merged 2 commits into
masterfrom
tkdodo/ref/check-knip-workspaces

Conversation

@TkDodo

@TkDodo TkDodo commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Knip now checks the Scraps and icons workspaces instead of ignoring them. It also checks unused exports in icon entry points and no longer treats every app icon as a production entry point. Test helpers and package verification scripts are excluded from production unused-file checks.

Icons kept for future use are marked @public. Six icons and their package exports are removed, and IconSize is kept private to its module. The Button story uses IconAdd and IconSubtract for zoom controls, matching the app, so IconZoom can be removed.

@TkDodo TkDodo changed the title chore(knip): Check Scraps and icons workspaces chore(✂️): Check Scraps and icons workspaces Oct 9, 2026
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 9, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

keeping these icons even though they have no usage

Comment thread knip.config.ts
'static/packages/icons': {
// Keep Knip's default coverage; test helpers are only used outside production.
project: ['**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}!', '!test/**!'],
includeEntryExports: true,

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

includeEntryExports lets us check usages across the monorepo. This is how we found the unused icons. Would love to turn this on for scraps too but we currently have a lot of things exported that are unused. We’d need to figure out if we want to keep them exported or if we mark them as public or delete them.

@TkDodo
TkDodo marked this pull request as ready for review October 9, 2026 10:30
@TkDodo
TkDodo requested review from a team as code owners October 9, 2026 10:30
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Story previews

Preview the stories changed in this PR on the Vercel deployment:

Preview deployment: https://sentry-osa3e71yu.sentry.dev

@TkDodo
TkDodo merged commit 8d94acc into master Oct 9, 2026
81 checks passed
@TkDodo
TkDodo deleted the tkdodo/ref/check-knip-workspaces branch October 9, 2026 10:39

This branch was successfully deployed

1 active deployment
Preview — b09c15c7 Deployed Oct 9, 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.

2 participants