diff --git a/web/.eslintrc.json b/web/.eslintrc.json deleted file mode 100644 index d2a18fa..0000000 --- a/web/.eslintrc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "next/core-web-vitals", - "rules": { - "react/no-unescaped-entities": "off" - } -} diff --git a/web/eslint.config.mjs b/web/eslint.config.mjs new file mode 100644 index 0000000..01ac2b2 --- /dev/null +++ b/web/eslint.config.mjs @@ -0,0 +1,32 @@ +import nextCoreWebVitals from 'eslint-config-next/core-web-vitals' + +// Next 16 removed `next lint`; eslint-config-next now ships a native ESLint 9 +// flat config, so we spread it directly (this replaces the old .eslintrc.json). +const eslintConfig = [ + ...nextCoreWebVitals, + { + rules: { + 'react/no-unescaped-entities': 'off', + // Next 16 enables the newer react-hooks (v6) compiler-adjacent rules by + // default. They flag working-but-non-optimal patterns across this + // pre-existing codebase, so keep them advisory (warn) rather than + // blocking; tighten to error as components are refactored. + 'react-hooks/set-state-in-effect': 'warn', + 'react-hooks/purity': 'warn', + 'react-hooks/static-components': 'warn', + 'react-hooks/refs': 'warn', + 'react-hooks/immutability': 'warn', + 'react-hooks/incompatible-library': 'warn', + }, + }, + { + ignores: [ + '.next/**', + 'node_modules/**', + 'test-results/**', + 'playwright-report/**', + ], + }, +] + +export default eslintConfig diff --git a/web/package.json b/web/package.json index 6121aec..d177d09 100644 --- a/web/package.json +++ b/web/package.json @@ -7,7 +7,7 @@ "build": "next build", "vercel-build": "next build", "start": "next start", - "lint": "next lint", + "lint": "eslint .", "test": "vitest run", "test:watch": "vitest", "test:e2e": "playwright test", @@ -63,6 +63,7 @@ "node": ">=18.17.0" }, "devDependencies": { + "@eslint/eslintrc": "^3.3.6", "@playwright/test": "^1.49.1", "@tailwindcss/postcss": "^4.3.2", "@testing-library/jest-dom": "^6.6.3", diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index d2ca54b..30bf568 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -138,6 +138,9 @@ importers: specifier: ^3.25.76 version: 3.25.76 devDependencies: + '@eslint/eslintrc': + specifier: ^3.3.6 + version: 3.3.6 '@playwright/test': specifier: ^1.49.1 version: 1.61.1