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:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useState } from 'react';
|
||||
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
|
||||
import { format } from 'date-fns';
|
||||
|
||||
import { Loader2, Send, CreditCard } from 'lucide-react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import { zodResolver } from '@hookform/resolvers/zod';
|
||||
@@ -33,7 +33,7 @@ export function InvoiceDetail({ invoiceId }: InvoiceDetailProps) {
|
||||
const queryClient = useQueryClient();
|
||||
const [tab, setTab] = useState('overview');
|
||||
|
||||
const { data, isLoading, error } = useQuery<{ data: any }>({
|
||||
const { data, isLoading, error } = useQuery<{ data: Record<string, unknown> }>({
|
||||
queryKey: ['invoices', invoiceId],
|
||||
queryFn: () => apiFetch(`/api/v1/invoices/${invoiceId}`),
|
||||
});
|
||||
@@ -172,7 +172,7 @@ export function InvoiceDetail({ invoiceId }: InvoiceDetailProps) {
|
||||
<span className="col-span-2 text-right">Unit Price</span>
|
||||
<span className="col-span-2 text-right">Total</span>
|
||||
</div>
|
||||
{invoice.lineItems.map((li: any) => (
|
||||
{(invoice.lineItems as Record<string, unknown>[]).map((li) => (
|
||||
<div key={li.id} className="grid grid-cols-12 gap-2 text-sm">
|
||||
<span className="col-span-6">{li.description}</span>
|
||||
<span className="col-span-2 text-right tabular-nums">{li.quantity}</span>
|
||||
@@ -239,7 +239,7 @@ export function InvoiceDetail({ invoiceId }: InvoiceDetailProps) {
|
||||
<TabsContent value="expenses" className="pt-4">
|
||||
{invoice.linkedExpenses && invoice.linkedExpenses.length > 0 ? (
|
||||
<div className="space-y-2">
|
||||
{invoice.linkedExpenses.map((exp: any) => (
|
||||
{(invoice.linkedExpenses as Record<string, unknown>[]).map((exp) => (
|
||||
<div
|
||||
key={exp.id}
|
||||
className="flex items-center justify-between p-3 border rounded-md text-sm"
|
||||
|
||||
Reference in New Issue
Block a user