Skip to content

client: set up knip and remove unused dependencies#760

Open
taobojlen wants to merge 1 commit into
roostorg:mainfrom
taobojlen:knip-client
Open

client: set up knip and remove unused dependencies#760
taobojlen wants to merge 1 commit into
roostorg:mainfrom
taobojlen:knip-client

Conversation

@taobojlen

@taobojlen taobojlen commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Context & Requests for Reviewers

Like #734, but for the client/ directory.

This PR adds knip, and removes unused dependencies from the client. We can continue using knip ad-hoc to remove unused code (there's quite a lot to remove from client/ actually!).

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)

Tests

I am primarily relying on Knip's logic and our test suite here. I also ran this locally, signed in to Coop, clicked around, reviewed some jobs -- everything seems to work.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@taobojlen, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 21 minutes and 32 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8e9551de-218c-46f8-8343-50a16269e2ac

📥 Commits

Reviewing files that changed from the base of the PR and between f396968 and e8d4351.

⛔ Files ignored due to path filters (1)
  • client/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • client/knip.json
  • client/package.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

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) <noreply@anthropic.com>
@taobojlen taobojlen marked this pull request as ready for review June 15, 2026 16:41

@juanmrad juanmrad left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

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