Skip to content

Remove unused exports/dead code from client#784

Draft
taobojlen wants to merge 2 commits into
mainfrom
tao/knip-client-unused-exports
Draft

Remove unused exports/dead code from client#784
taobojlen wants to merge 2 commits into
mainfrom
tao/knip-client-unused-exports

Conversation

@taobojlen

Copy link
Copy Markdown
Contributor

Context & Requests for Reviewers

This PR uses Knip to remove a lot of unused exports from client/. Knip detects places where we export something that it never imported.

Once I removed the unnecessary exports, then eslint flagged a lot of dead code -- so I deleted it.

Tests

The best evidence that this doesn't break anything is that our build still works!

taobojlen and others added 2 commits June 15, 2026 17:35
Add knip and a `knip` npm script to find unused files, exports, and
dependencies in the client.

knip.json relies on knip's Vite / Vitest / Storybook / ESLint / Tailwind /
PostCSS plugin auto-detection, ignores the generated GraphQL types
(src/graphql/generated.ts), and ignores @types/google.maps (used as an
ambient global namespace, which knip can't trace via imports).

Remove dependencies with no references anywhere in the source tree:
- framer-motion, jsonpointer, papaparse, react-markdown,
  react-router-hash-link, validator
- @eslint/js (not imported by the flat config; bundled by eslint itself)
- orphaned/obsolete types: @types/papaparse, @types/react-router-hash-link,
  @types/validator (their runtime packages were removed) and @types/recharts
  (recharts ships its own type definitions)

Kept web-vitals — it's loaded via a dynamic import in reportWebVitals.js.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ef757623-fd2a-4934-8299-d7bbd02db172

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tao/knip-client-unused-exports

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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.

1 participant