import { defineConfig, globalIgnores } from "eslint/config"; import nextVitals from "eslint-config-next/core-web-vitals"; import nextTs from "eslint-config-next/typescript"; const eslintConfig = defineConfig([ ...nextVitals, ...nextTs, globalIgnores([".next/**", "out/**", "build/**", "next-env.d.ts", "scripts/**", "public/sw.js", "e2e-shots/**"]), { rules: { // French UI copy is full of apostrophes; JSX text is already escaped by React. "react/no-unescaped-entities": "off", // Images come from our own authenticated API (dynamic, private) — next/image optimisation is not applicable. "@next/next/no-img-element": "off", "@typescript-eslint/no-explicit-any": "warn", // download links to our own API routes are plain on purpose (no client navigation) "@next/next/no-html-link-for-pages": "off", "react-hooks/set-state-in-effect": "warn", }, }, ]); export default eslintConfig;