fix: tech debt batch 1 — TS errors, vulnerabilities, dead code
- Fixed 12 TypeScript errors across analytics.ts, observer-project-detail.tsx, bulk-upload/page.tsx, settings/profile/page.tsx - npm audit: 8 vulnerabilities resolved (1 critical, 4 high, 3 moderate) - Deleted 3 dead files: live-control.ts (618 lines), feature-flags.ts, file-type-categories.ts - Removed typescript.ignoreBuildErrors: true — TS errors now block builds Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -94,10 +94,10 @@ export default function ProfileSettingsPage() {
|
||||
setExpertiseTags(user.expertiseTags || [])
|
||||
setDigestFrequency(user.digestFrequency || 'none')
|
||||
setPreferredWorkload(user.preferredWorkload ?? null)
|
||||
const avail = user.availabilityJson as { startDate?: string; endDate?: string } | null
|
||||
if (avail) {
|
||||
setAvailabilityStart(avail.startDate || '')
|
||||
setAvailabilityEnd(avail.endDate || '')
|
||||
const avail = user.availabilityJson as Array<{ start?: string; end?: string }> | null
|
||||
if (avail && avail.length > 0) {
|
||||
setAvailabilityStart(avail[0].start || '')
|
||||
setAvailabilityEnd(avail[0].end || '')
|
||||
}
|
||||
setProfileLoaded(true)
|
||||
}
|
||||
@@ -114,10 +114,10 @@ export default function ProfileSettingsPage() {
|
||||
expertiseTags,
|
||||
digestFrequency: digestFrequency as 'none' | 'daily' | 'weekly',
|
||||
preferredWorkload: preferredWorkload ?? undefined,
|
||||
availabilityJson: (availabilityStart || availabilityEnd) ? {
|
||||
startDate: availabilityStart || undefined,
|
||||
endDate: availabilityEnd || undefined,
|
||||
} : undefined,
|
||||
availabilityJson: (availabilityStart || availabilityEnd) ? [{
|
||||
start: availabilityStart || '',
|
||||
end: availabilityEnd || '',
|
||||
}] : undefined,
|
||||
})
|
||||
toast.success('Profile updated successfully')
|
||||
refetch()
|
||||
|
||||
Reference in New Issue
Block a user