Problem
Multiple files cast supabase.from(...) to any because the generated Supabase types don't include newer tables (comments, page_views). This suppresses type checking on all DB queries for these tables.
Fix
- Regenerate Supabase TypeScript types from the live schema
- Remove all
as any casts on supabase.from(...) calls
- Remove corresponding
eslint-disable @typescript-eslint/no-explicit-any comments
Files affected
src/app/api/comments/route.ts
src/app/api/views/route.ts
src/app/api/index/donation/route.ts
src/components/WriterTradingStats.tsx
src/app/dashboard/writer/page.tsx
- Any other files with
supabase.from(...) as any
Acceptance Criteria
Problem
Multiple files cast
supabase.from(...)toanybecause the generated Supabase types don't include newer tables (comments,page_views). This suppresses type checking on all DB queries for these tables.Fix
as anycasts onsupabase.from(...)callseslint-disable @typescript-eslint/no-explicit-anycommentsFiles affected
src/app/api/comments/route.tssrc/app/api/views/route.tssrc/app/api/index/donation/route.tssrc/components/WriterTradingStats.tsxsrc/app/dashboard/writer/page.tsxsupabase.from(...) as anyAcceptance Criteria
as anycasts on Supabase queriesnpm run typecheckpasses