Remove unnecessary as any casts on Supabase cod_orders queries#112
Conversation
Co-authored-by: asperpharma <252395498+asperpharma@users.noreply.github.com>
as any casts on Supabase cod_orders queries
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
There was a problem hiding this comment.
Pull request overview
This PR removes unnecessary TypeScript type casts (as any and as never) from Supabase cod_orders query calls in two admin pages. The cod_orders table is fully defined in the auto-generated Supabase types (src/integrations/supabase/types.ts), making these suppressions unnecessary and the cause of CI failures due to @typescript-eslint/no-explicit-any lint errors.
Changes:
- Removed
(supabase as any)casts andas nevercasts on.update()payloads forcod_ordersqueries inAdminOrders.tsxandDriverDashboard.tsx.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/pages/AdminOrders.tsx |
Removed (supabase as any) and { status: newStatus } as never casts from the updateOrderStatus function |
src/pages/DriverDashboard.tsx |
Removed (supabase as any) and updateData as never casts from the updateOrderStatus function |
CI was failing due to
@typescript-eslint/no-explicit-anyerrors introduced by(supabase as any)casts when queryingcod_ordersin two admin pages.Changes
src/pages/AdminOrders.tsx/src/pages/DriverDashboard.tsx: Removed(supabase as any)and the correspondingas nevercasts on update payloads —cod_ordersis already present in the auto-generated Supabase types, making these suppressions unnecessary.💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.