chore: garbage-collect dead code (sdk/, 16 unused packages)#4
Conversation
Removed 296 of 341 warnings (87% reduction): - Remove unused imports (React, components, named imports) - Prefix unused variables with _ - Fix no-undef bugs: add missing vars in KalshiOrderPanel, TippingModal, signals/page - Fix no-empty blocks with comments, no-extra-semi, no-case-declarations with braces - Revert broken prefixing on 3 files (test-deep-reasoning, polymarketService, aiService.server) Remaining 45 are JSX false positives in 3D components (Scene3D, ForecastPortals, weather3d/*) and 3 intentionally kept dead-code variables (dead code, non-breaking).
- Update react/react-dom from ^18.3.1 to ^19 - Update @types/react and @types/react-dom from ^18 to ^19 - @react-three/drei v10 requires React 19 peer dep (was masked by legacy-peer-deps) - All major deps (next, redux, wagmi, react-query, antd) support React 19 - .npmrc: keep legacy-peer-deps for eslint-config-next@16 requiring eslint>=9 (separate issue) - Full CI: typecheck ✅, lint ✅ (45 warnings, same 45), tests ✅ (131/131)
…pty)" This reverts commit 1c468a3.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Review Summary by QodoRemove orphaned SDK directory and clean up 16 unused packages
WalkthroughsDescription• Removed orphaned sdk/ directory (1214 lines, unused) • Uninstalled 16 unused npm packages from dependencies • Added missing @polymarket/builder-signing-sdk dependency • Upgraded React from v18 to v19 with type definitions • Updated ESLint configuration to remove sdk/ ignore pattern • Added .npmrc comments clarifying legacy-peer-deps requirement Diagramflowchart LR
A["Orphaned sdk/ directory"] -->|Remove| B["Deleted 1214 lines"]
C["16 unused packages"] -->|Uninstall| D["Cleaned dependencies"]
E["Missing dependency"] -->|Add| F["@polymarket/builder-signing-sdk"]
G["React v18"] -->|Upgrade| H["React v19"]
I["Config files"] -->|Update| J["ESLint & .npmrc"]
B --> K["Cleaner codebase"]
D --> K
F --> K
H --> K
J --> K
File Changes1. sdk/src/SignalPublisher.ts
|
Code Review by Qodo
1. Missing recharts dependency
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (10)
📝 WalkthroughWalkthroughThe PR removes the Aptos-based SDK subsystem from the project, updates linting and build configuration to reflect its absence, and modernizes the dependency tree by upgrading React to version 19, removing wallet-related packages, and introducing the Polymarket builder signing SDK. ChangesSDK Deprecation and React 19 Migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
| "postprocessing": "^6.37.7", | ||
| "react": "^18.3.1", | ||
| "react-dom": "^18.3.1", | ||
| "recharts": "3.8.1", |
There was a problem hiding this comment.
1. Missing recharts dependency 🐞 Bug ≡ Correctness
components/PersonalStatsDashboard.js imports "recharts" but package.json no longer includes it, so builds will fail with "Cannot find module 'recharts'". This dashboard is imported by app/components/signals/MySignalsTab.js, so the missing dependency is on an active runtime path.
Agent Prompt
### Issue description
`recharts` was removed from `package.json`, but the app still imports and renders `PersonalStatsDashboard`, which depends on `recharts`. This will break the Next.js build/bundle step due to unresolved module import.
### Issue Context
- `PersonalStatsDashboard` directly imports multiple exports from `recharts`.
- `MySignalsTab` imports and renders `PersonalStatsDashboard`, so this is not dead code.
### Fix Focus Areas
- package.json[26-58]
- components/PersonalStatsDashboard.js[1-6]
- app/components/signals/MySignalsTab.js[1-4]
### Expected fix
Either:
1) Add `recharts` back to `dependencies` (preferred if the dashboard is intended), or
2) Remove/replace the `PersonalStatsDashboard` feature and delete the `recharts` import(s).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Changes
sdk/directory (orphaned project, 1214 lines)@polymarket/builder-signing-sdk(was already imported, missing from package.json)Summary by CodeRabbit
Release Notes