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:
@@ -1,6 +1,6 @@
|
||||
'use client';
|
||||
|
||||
import { useState, useCallback, useMemo, useEffect } from 'react';
|
||||
import { useState, useCallback, useMemo } from 'react';
|
||||
import { useQuery, useQueryClient, type QueryKey } from '@tanstack/react-query';
|
||||
import { useSearchParams, useRouter, usePathname } from 'next/navigation';
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
type FilterValues,
|
||||
} from '@/components/shared/filter-bar';
|
||||
|
||||
interface UsePaginatedQueryOptions<T> {
|
||||
interface UsePaginatedQueryOptions {
|
||||
queryKey: QueryKey;
|
||||
endpoint: string;
|
||||
initialPage?: number;
|
||||
@@ -27,7 +27,7 @@ export function usePaginatedQuery<T>({
|
||||
initialPage = 1,
|
||||
initialPageSize = 25,
|
||||
filterDefinitions = [],
|
||||
}: UsePaginatedQueryOptions<T>) {
|
||||
}: UsePaginatedQueryOptions) {
|
||||
const searchParams = useSearchParams();
|
||||
const router = useRouter();
|
||||
const pathname = usePathname();
|
||||
@@ -67,7 +67,7 @@ export function usePaginatedQuery<T>({
|
||||
if (tab) params.set('tab', tab);
|
||||
|
||||
const qs = params.toString();
|
||||
router.replace(`${pathname}${qs ? `?${qs}` : ''}` as any, { scroll: false });
|
||||
router.replace(`${pathname}${qs ? `?${qs}` : ''}`, { scroll: false });
|
||||
},
|
||||
[pathname, router, searchParams, initialPageSize],
|
||||
);
|
||||
@@ -147,7 +147,7 @@ export function usePaginatedQuery<T>({
|
||||
if (!old) return old;
|
||||
return {
|
||||
...old,
|
||||
data: old.data.filter((item: any) => item.id !== id),
|
||||
data: old.data.filter((item: Record<string, unknown>) => item.id !== id),
|
||||
pagination: {
|
||||
...old.pagination,
|
||||
total: old.pagination.total - 1,
|
||||
|
||||
Reference in New Issue
Block a user