Files
websitedev/proto/eslint.config.mjs
T
Do SikiandClaude Opus 5.5 e3ec6a9ac3 feat(cms): switch Payload to PostgreSQL with a fresh baseline migration (MITHOME-136)
- postgresAdapter (uuid ids, no push, prodMigrations), DATABASE_URI
- src/payload.shared.ts: the config without the db adapter, shared with the
  one-off MongoDB content transfer
- baseline migration 20260929_200306_initial (86 tables; applied twice on a
  disposable PostgreSQL 16: second run is a no-op)
- seed copy (references, hosting plans) moved to src/content/seeds/
- MongoDB data migrations, their helpers/tests and the dead lib/mongodb.ts
  removed (kept in git history)
- npm scripts for the Payload CLI (works now that the package is ESM)

Branch only: staging has no PostgreSQL yet (tasks 3.x).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 22:09:00 +02:00

51 lines
1.7 KiB
JavaScript
Executable File

// NOTE (Next.js 16 / eslint-config-next 16): the FlatCompat("next/core-web-vitals")
// bridge to the legacy .eslintrc-style config caused a circular-JSON crash in
// ESLint 9 (the "react" plugin object closes a cycle when re-validated through
// FlatCompat). eslint-config-next now ships native flat-config arrays, so
// import those directly instead of going through the compat layer.
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
import nextTypescript from "eslint-config-next/typescript";
const eslintConfig = [
...nextCoreWebVitals,
...nextTypescript,
{
ignores: [
"node_modules/**",
".next/**",
"out/**",
"build/**",
"next-env.d.ts",
// Generated test output (Playwright report/traces, Jest coverage) — not source.
"playwright-report/**",
"test-results/**",
"coverage/**",
// MITHOME-136: generated by `payload migrate:create` — not edited by hand.
"src/migrations/2*.ts",
],
},
{
// WHY: test suites legitimately use `any` mocks, jest globals and CommonJS
// require(); jest/playwright config files are CommonJS by design. Relax the
// strict rules there so lint failures point at real production-code issues.
files: [
"**/*.test.ts",
"**/*.test.tsx",
// MITHOME-136: package is "type": "module", so the CommonJS jest files are .cjs.
"jest.config*.cjs",
"jest.setup*.cjs",
"jest.globalSetup*.cjs",
"jest.globalTeardown*.cjs",
"playwright.config.ts",
],
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-unused-vars": "off",
"react/display-name": "off",
},
},
];
export default eslintConfig;