Fix all ESLint errors: remove unused imports, replace any types
- Remove ~60 unused imports and variables across 88 files - Replace ~80 `any` type annotations with proper types (unknown, Record<string, unknown>, or specific types) - Prefix unused callback args with underscore - Fix unescaped JSX entities - Lint now passes cleanly (0 errors, 2 intentional img warnings) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,6 @@ export function ExpenseFormDialog({ open, onOpenChange, expense }: ExpenseFormDi
|
||||
register,
|
||||
handleSubmit,
|
||||
setValue,
|
||||
watch,
|
||||
reset,
|
||||
formState: { errors, isSubmitting },
|
||||
} = useForm<CreateExpenseInput>({
|
||||
@@ -60,11 +59,11 @@ export function ExpenseFormDialog({ open, onOpenChange, expense }: ExpenseFormDi
|
||||
establishmentName: expense.establishmentName ?? undefined,
|
||||
amount: Number(expense.amount),
|
||||
currency: expense.currency,
|
||||
category: expense.category as any,
|
||||
paymentMethod: expense.paymentMethod as any,
|
||||
category: expense.category as string,
|
||||
paymentMethod: expense.paymentMethod as string,
|
||||
payer: expense.payer ?? undefined,
|
||||
expenseDate: new Date(expense.expenseDate),
|
||||
paymentStatus: (expense.paymentStatus as any) ?? 'unpaid',
|
||||
paymentStatus: (expense.paymentStatus as string) ?? 'unpaid',
|
||||
});
|
||||
} else if (open && !expense) {
|
||||
reset({
|
||||
@@ -162,7 +161,7 @@ export function ExpenseFormDialog({ open, onOpenChange, expense }: ExpenseFormDi
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="category">Category</Label>
|
||||
<Select
|
||||
onValueChange={(v) => setValue('category', v as any)}
|
||||
onValueChange={(v) => setValue('category', v as string)}
|
||||
defaultValue={expense?.category ?? undefined}
|
||||
>
|
||||
<SelectTrigger id="category">
|
||||
@@ -181,7 +180,7 @@ export function ExpenseFormDialog({ open, onOpenChange, expense }: ExpenseFormDi
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="paymentMethod">Payment Method</Label>
|
||||
<Select
|
||||
onValueChange={(v) => setValue('paymentMethod', v as any)}
|
||||
onValueChange={(v) => setValue('paymentMethod', v as string)}
|
||||
defaultValue={expense?.paymentMethod ?? undefined}
|
||||
>
|
||||
<SelectTrigger id="paymentMethod">
|
||||
@@ -209,7 +208,7 @@ export function ExpenseFormDialog({ open, onOpenChange, expense }: ExpenseFormDi
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="paymentStatus">Payment Status</Label>
|
||||
<Select
|
||||
onValueChange={(v) => setValue('paymentStatus', v as any)}
|
||||
onValueChange={(v) => setValue('paymentStatus', v as 'unpaid' | 'paid' | 'partial')}
|
||||
defaultValue={expense?.paymentStatus ?? 'unpaid'}
|
||||
>
|
||||
<SelectTrigger id="paymentStatus">
|
||||
|
||||
Reference in New Issue
Block a user