Files
websitedev/proto/eslint.config.mjs
T
Do SikiandClaude Opus 5.5 a3d6cbe404
CI Pipeline with Test Management / 🧪 Run Tests & Generate Reports (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 🧪 Run Tests & Generate Reports (push) Canceled after 0s
CI Pipeline with Test Management / 🐳 Docker Integration Tests (push) Canceled after 0s
CI Pipeline with Test Management / 🏗️ Build Docker Image (push) Canceled after 0s
CI Pipeline with Test Management / 📊 Generate Test Summary (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 📊 Analyze Test Coverage (push) Canceled after 0s
Test Reporting & Gherkin Analysis / 🔄 Sync with Linear (push) Canceled after 0s
Test Reporting & Gherkin Analysis / ⚡ Performance Monitoring (push) Canceled after 0s
build(proto): mark the package as ESM so the Payload CLI loads the config (MITHOME-136)
The Payload CLI failed with ERR_REQUIRE_ASYNC_MODULE on Node 22 and 26 alike:
without "type": "module" it loaded payload.config.ts as CommonJS and could
not require the top-level-await ESM @payloadcms/richtext-lexical. Following
the official Payload template: "type": "module", CommonJS jest files and the
content schema renamed to .cjs, ESLint globs updated. Next's standalone
server.js is ESM and starts; 516 unit tests, tsc, lint and build are green.

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

49 lines
1.6 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/**",
],
},
{
// 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;