import { defineConfig, globalIgnores } from "eslint/config"; import nextVitals from "eslint-config-next/core-web-vitals"; import nextTs from "eslint-config-next/typescript"; // Next.js 16's own flat configs (no more FlatCompat / eslintrc). Run with `npm run lint` // (`next lint` was removed in Next 16). const eslintConfig = defineConfig([ ...nextVitals, ...nextTs, { // React Compiler-era rules that eslint-plugin-react-hooks 7 (with Next 16) turns on as // errors. They flag patterns the app uses on purpose and that work (mostly loading data in // useEffect), so they're warnings while the code is moved off them screen by screen — // see HANDOVER, "Next.js 16". New code should follow them. rules: { "react-hooks/set-state-in-effect": "warn", "react-hooks/purity": "warn", "react-hooks/immutability": "warn", "react-hooks/static-components": "warn", "react-hooks/refs": "warn", }, }, globalIgnores([".next/**", ".next-*/**", "out/**", "build/**", "next-env.d.ts", "src/lib/api-v2/schema.d.ts"]), ]); export default eslintConfig;