cms.c2sgmbh/eslint.config.mjs
Martin Porwoll 55189aaa1a fix: resolve ESLint circular structure crash and tsc OOM
- Replace FlatCompat bridge with native flat config imports from
  eslint-config-next (16.x exports flat configs directly)
- Remove unused @eslint/eslintrc devDependency
- Increase tsc heap to 4096MB for typecheck (55+ collections exceed 2GB)
- Exclude migrations, test artifacts from tsconfig type-checking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 22:13:45 +00:00

48 lines
1.3 KiB
JavaScript

import coreWebVitals from 'eslint-config-next/core-web-vitals'
import typescript from 'eslint-config-next/typescript'
const eslintConfig = [
...coreWebVitals,
...typescript,
{
rules: {
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/no-empty-object-type': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unsafe-function-type': 'warn', // Some legacy patterns use Function type
'@typescript-eslint/no-unused-vars': [
'warn',
{
vars: 'all',
args: 'after-used',
ignoreRestSiblings: false,
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^(_|ignore)',
},
],
},
},
{
// Payload Admin components can use <a> elements (they're not in Next.js page router)
files: ['src/components/admin/**/*.tsx'],
rules: {
'@next/next/no-html-link-for-pages': 'off',
},
},
{
ignores: [
'.next/',
'coverage/',
'node_modules/',
'playwright-report/',
'test-results/',
'next-env.d.ts',
'src/migrations/', // Payload migrations have required but unused params
'src/migrations_backup/',
],
},
]
export default eslintConfig