From 01c6c2f8d09f41c52de8d81d94677073b55dbd9a Mon Sep 17 00:00:00 2001 From: Sean O'Connor Date: Mon, 14 Sep 2026 18:49:44 -0400 Subject: [PATCH] fix(lint): use eslint-config-next flat config eslint-config-next 16.3.5 ships flat configs; feeding them through FlatCompat wrapped the plugins and crashed lint with a circular-structure JSON error. Import the flat config directly and drop @eslint/eslintrc. --- bun.lock | 7 +++---- eslint.config.js | 10 +++------- package.json | 1 - 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/bun.lock b/bun.lock index e33cc32..044eaf5 100644 --- a/bun.lock +++ b/bun.lock @@ -84,7 +84,6 @@ "zustand": "^4.5.7", }, "devDependencies": { - "@eslint/eslintrc": "^3.3.7", "@tailwindcss/postcss": "^4.3.3", "@types/bcryptjs": "^3.0.0", "@types/bun": "^1.4.2", @@ -1204,7 +1203,7 @@ "glob-parent": ["glob-parent@6.0.2", "", { "dependencies": { "is-glob": "^4.0.3" } }, "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A=="], - "globals": ["globals@14.0.0", "", {}, "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ=="], + "globals": ["globals@16.4.0", "", {}, "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw=="], "globalthis": ["globalthis@1.0.4", "", { "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" } }, "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ=="], @@ -1850,6 +1849,8 @@ "@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="], + "@eslint/eslintrc/globals": ["globals@14.0.0", "", {}, "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ=="], + "@img/sharp-wasm32/@emnapi/runtime": ["@emnapi/runtime@1.11.3", "", { "dependencies": { "tslib": "^2.4.0" } }, "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA=="], "@next/eslint-plugin-next/@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.9.1", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ=="], @@ -1888,8 +1889,6 @@ "bun-types/@types/node": ["@types/node@26.5.1", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-CzNm2FezW4VR/LjG6yUdiEgLE/rAQ9Slj5gCu/C2VrdcW7I0ahNZ8DRbHT7zOZ6r3ONgd/bsQIeSaoDGrd1C6g=="], - "eslint-config-next/globals": ["globals@16.4.0", "", {}, "sha512-ob/2LcVVaVGCYN+r14cnwnoDPUufjiYgSqRhiFD0Q1iI4Odora5RE8Iv1D24hAz5oMophRGkGz+yuvQmmUMnMw=="], - "eslint-import-resolver-node/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="], "eslint-module-utils/debug": ["debug@3.2.7", "", { "dependencies": { "ms": "^2.1.1" } }, "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ=="], diff --git a/eslint.config.js b/eslint.config.js index 580deae..7a4f21e 100755 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,17 +1,13 @@ -import { FlatCompat } from "@eslint/eslintrc"; import tseslint from "typescript-eslint"; // @ts-ignore -- no types for this plugin import drizzle from "eslint-plugin-drizzle"; - -const compat = new FlatCompat({ - baseDirectory: import.meta.dirname, -}); +import nextVitals from "eslint-config-next/core-web-vitals"; export default tseslint.config( { ignores: [".next"], }, - ...compat.extends("next/core-web-vitals"), + ...nextVitals, { files: ["**/*.ts", "**/*.tsx"], plugins: { @@ -58,4 +54,4 @@ export default tseslint.config( }, }, }, -); +); \ No newline at end of file diff --git a/package.json b/package.json index d5cb9f6..b04d0a8 100755 --- a/package.json +++ b/package.json @@ -107,7 +107,6 @@ "zustand": "^4.5.7" }, "devDependencies": { - "@eslint/eslintrc": "^3.3.7", "@tailwindcss/postcss": "^4.3.3", "@types/bcryptjs": "^3.0.0", "@types/bun": "^1.4.2",