diff --git a/web/.eslintrc.json b/web/.eslintrc.json deleted file mode 100644 index bffb357..0000000 --- a/web/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "next/core-web-vitals" -} diff --git a/web/eslint.config.mjs b/web/eslint.config.mjs new file mode 100644 index 0000000..6c07dde --- /dev/null +++ b/web/eslint.config.mjs @@ -0,0 +1,8 @@ +import nextCoreWebVitals from "eslint-config-next/core-web-vitals"; + +export default [ + { + ignores: [".next/**", "node_modules/**", "src/gql/**", "next-env.d.ts"], + }, + ...nextCoreWebVitals, +]; diff --git a/web/package.json b/web/package.json index 4e74850..d893efd 100644 --- a/web/package.json +++ b/web/package.json @@ -6,7 +6,7 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint", + "lint": "eslint .", "test": "vitest run", "test:watch": "vitest", "codegen": "graphql-codegen", diff --git a/web/src/components/layout/Header.tsx b/web/src/components/layout/Header.tsx index 77dc93b..f2975d8 100644 --- a/web/src/components/layout/Header.tsx +++ b/web/src/components/layout/Header.tsx @@ -36,6 +36,7 @@ export const Header = () => { // hide menu on path change useEffect(() => { + // eslint-disable-next-line react-hooks/set-state-in-effect -- intentional: close the menu when navigation changes the path setShowMenu(false); }, [pathname]); diff --git a/web/src/components/search/SearchShell.tsx b/web/src/components/search/SearchShell.tsx index b59ea01..dd9875a 100644 --- a/web/src/components/search/SearchShell.tsx +++ b/web/src/components/search/SearchShell.tsx @@ -24,6 +24,7 @@ export function SearchShell({ const [inputValue, setInputValue] = useState(initialQuery); const [isPending, startTransition] = useTransition(); const lastPushedRef = useRef(initialQuery); + // eslint-disable-next-line react-hooks/refs -- deliberate: compares against the last debounced push; a stale read only briefly extends the spinner const fetching = isPending || inputValue !== lastPushedRef.current; const pushQuery = useDebouncedCallback((next: string) => {