client: set up knip and remove unused dependencies#760
Conversation
|
Warning Review limit reached
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
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>
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:
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.