mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 15:04:14 +00:00
- 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>
48 lines
1.3 KiB
JavaScript
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
|