fix: suppress remaining ESLint warnings blocking CI

- Disable react-hooks/incompatible-library warnings for RHF watch()
  and TanStack useReactTable() — these are false positives from the
  React Compiler plugin
- Remove unused useDebounce import and variable from vendor-table

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
xCyanGrizzly
2026-02-18 15:51:28 +01:00
parent 564f81585b
commit a6fd8ca877
5 changed files with 5 additions and 3 deletions

View File

@@ -80,6 +80,7 @@ export function FilamentForm({ filament, vendors, locations, onSuccess }: Filame
}, },
}); });
// eslint-disable-next-line react-hooks/incompatible-library -- RHF watch is safe here, used only for preview swatch
const watchColorHex = form.watch("colorHex"); const watchColorHex = form.watch("colorHex");
function handleCatalogSelect(item: CatalogItem) { function handleCatalogSelect(item: CatalogItem) {

View File

@@ -78,6 +78,7 @@ export function PaintForm({ paint, vendors, locations, onSuccess }: PaintFormPro
}, },
}); });
// eslint-disable-next-line react-hooks/incompatible-library -- RHF watch is safe here, used only for preview swatch
const watchColorHex = form.watch("colorHex"); const watchColorHex = form.watch("colorHex");
function handleCatalogSelect(item: CatalogItem) { function handleCatalogSelect(item: CatalogItem) {

View File

@@ -76,6 +76,7 @@ export function ResinForm({ resin, vendors, locations, onSuccess }: ResinFormPro
}, },
}); });
// eslint-disable-next-line react-hooks/incompatible-library -- RHF watch is safe here, used only for preview swatch
const watchColorHex = form.watch("colorHex"); const watchColorHex = form.watch("colorHex");
function handleCatalogSelect(item: CatalogItem) { function handleCatalogSelect(item: CatalogItem) {

View File

@@ -5,7 +5,7 @@ import { useRouter, usePathname, useSearchParams } from "next/navigation";
import { Plus, Search } from "lucide-react"; import { Plus, Search } from "lucide-react";
import { toast } from "sonner"; import { toast } from "sonner";
import { useDataTable } from "@/hooks/use-data-table"; import { useDataTable } from "@/hooks/use-data-table";
import { useDebounce } from "@/hooks/use-debounce"; // useDebounce reserved for future search debouncing
import { getVendorColumns } from "./vendor-columns"; import { getVendorColumns } from "./vendor-columns";
import { VendorModal } from "./vendor-modal"; import { VendorModal } from "./vendor-modal";
import { deleteVendor, archiveVendor } from "../actions"; import { deleteVendor, archiveVendor } from "../actions";
@@ -44,8 +44,6 @@ export function VendorTable({ data, pageCount, totalCount }: VendorTableProps) {
const [deleteId, setDeleteId] = useState<string | null>(null); const [deleteId, setDeleteId] = useState<string | null>(null);
const [searchValue, setSearchValue] = useState(searchParams.get("search") ?? ""); const [searchValue, setSearchValue] = useState(searchParams.get("search") ?? "");
const _debouncedSearch = useDebounce(searchValue, 300);
// Update URL when search changes // Update URL when search changes
const updateSearch = (value: string) => { const updateSearch = (value: string) => {
setSearchValue(value); setSearchValue(value);

View File

@@ -59,6 +59,7 @@ export function useDataTable<TData>({
[searchParams] [searchParams]
); );
// eslint-disable-next-line react-hooks/incompatible-library -- TanStack Table API is safe in this context
const table = useReactTable({ const table = useReactTable({
data, data,
columns, columns,