The staging noindex (MITHOME-116) hinges on a build variable; leaking it into production would silently drop the site from Google. deploy.sh now refuses to build production when NEXT_PUBLIC_DEPLOY_ENV=staging is set, and after every deploy runs scripts/check-indexability.sh, expecting an indexable production and a blocked staging (node tests cover both ways, stray noindex and unreachable endpoints; added to pre-deploy tests). A separate Playwright project, production-seo (npm run test:seo:production), checks robots.txt, that all 12 sitemap URLs are final/indexable with self canonicals and sitemap hreflangs, SSR content and links, the / -> /hu redirect and real 404s; host redirects are gated until the production domain is live. Verified on a production-mode build of a staging DB copy (5 passed) and failing as expected against staging. eslint now ignores generated test output (playwright-report, test-results, coverage), which broke the pre-deploy lint after local e2e runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
47 lines
1.5 KiB
JavaScript
Executable File
47 lines
1.5 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",
|
|
"jest.config*.js",
|
|
"jest.setup*.js",
|
|
"jest.globalSetup*.js",
|
|
"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;
|