From 55189aaa1a809b128518f016f5ea7484a4088ae5 Mon Sep 17 00:00:00 2001 From: Martin Porwoll Date: Fri, 13 Feb 2026 22:13:45 +0000 Subject: [PATCH] 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 --- eslint.config.mjs | 15 ++++----------- package.json | 3 +-- pnpm-lock.yaml | 3 --- tsconfig.json | 7 ++++++- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index f17e7d5..0541cf6 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,16 +1,9 @@ -import { dirname } from 'path' -import { fileURLToPath } from 'url' -import { FlatCompat } from '@eslint/eslintrc' - -const __filename = fileURLToPath(import.meta.url) -const __dirname = dirname(__filename) - -const compat = new FlatCompat({ - baseDirectory: __dirname, -}) +import coreWebVitals from 'eslint-config-next/core-web-vitals' +import typescript from 'eslint-config-next/typescript' const eslintConfig = [ - ...compat.extends('next/core-web-vitals', 'next/typescript'), + ...coreWebVitals, + ...typescript, { rules: { '@typescript-eslint/ban-ts-comment': 'warn', diff --git a/package.json b/package.json index 3cccb32..743584d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "generate:types": "cross-env NODE_OPTIONS=--no-deprecation payload generate:types", "lint": "cross-env NODE_OPTIONS=--no-deprecation eslint src", "check:frameworks": "bash ./scripts/check-framework-updates.sh", - "typecheck": "cross-env NODE_OPTIONS=--no-deprecation tsc --noEmit", + "typecheck": "cross-env NODE_OPTIONS=\"--no-deprecation --max-old-space-size=4096\" tsc --noEmit", "format:check": "prettier --check \"src/**/*.{ts,tsx,js,jsx}\" --ignore-unknown", "format": "prettier --write \"src/**/*.{ts,tsx,js,jsx}\" --ignore-unknown", "payload": "cross-env NODE_OPTIONS=--no-deprecation payload", @@ -58,7 +58,6 @@ "sharp": "0.34.5" }, "devDependencies": { - "@eslint/eslintrc": "^3.3.3", "@playwright/test": "1.57.0", "@types/node": "^22.10.2", "@types/node-cron": "^3.0.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 550741f..fa12a69 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -96,9 +96,6 @@ importers: specifier: 0.34.5 version: 0.34.5 devDependencies: - '@eslint/eslintrc': - specifier: ^3.3.3 - version: 3.3.3 '@playwright/test': specifier: 1.57.0 version: 1.57.0 diff --git a/tsconfig.json b/tsconfig.json index 2bb00aa..3ac02ae 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -40,6 +40,11 @@ ".next/dev/types/**/*.ts" ], "exclude": [ - "node_modules" + "node_modules", + "src/migrations", + "src/migrations_backup", + "test-results", + "playwright-report", + "coverage" ] }