chore: remove dead code and reduce export surface#662
chore: remove dead code and reduce export surface#662kamilwronka wants to merge 1 commit intodevelopfrom
Conversation
- Delete unused respawn-auto-close-job.ts (no imports anywhere) - Make getEventEffectiveStartDate and isEventActiveAt non-exported (only used internally within event-activity.util.ts) - Remove redundant `as const` from Prisma mode: "insensitive" literals in kills.service.ts (TypeScript infers the literal type automatically) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThree files undergo refactoring: two utility functions in the event-activity utility are made non-exported, an entire respawn auto-close job utility file is deleted, and Prisma filter literals in the kills service have their type assertion syntax simplified. No functional logic is modified. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Summary
respawn-auto-close-job.ts— entire file had zero imports anywhere in the codebasegetEventEffectiveStartDateandisEventActiveAtnon-exported inevent-activity.util.ts— only used internally within the same fileas constfrommode: "insensitive"inkills.service.ts(3 occurrences) — TypeScript already infers the literal typeWhy each change is safe
AUTO_CLOSE_*,RESPAWN_AUTO_CLOSE_JOB_NAME,buildRespawnAutoCloseJobId,getRespawnAutoCloseDelay) returns zero external referencesgetEventEffectiveStartDateis called byisEventActiveAtandcompareEventsByActivityAndStart(both in the same file);isEventActiveAtis called byattachComputedEventActive(same file). No external consumers.as const: Pure type-level change; Prisma'sQueryModeaccepts"insensitive"as a literal without the assertionTouched files
apps/api/src/events/utils/respawn-auto-close-job.ts(deleted)apps/api/src/events/utils/event-activity.util.ts(2 lines changed)apps/api/src/kills/kills.service.ts(3 lines changed)Residual risks
None — all 590 tests pass, lint clean, format clean.
🤖 Generated with Claude Code
Summary by CodeRabbit