From fac50865ffb002529de8740e80bbbda5f0713663 Mon Sep 17 00:00:00 2001 From: Lagoni <68890168+ALagoni97@users.noreply.github.com> Date: Tue, 14 Jul 2026 14:05:13 +0200 Subject: [PATCH] fix(lint): fix ESLint config loading broken on Node.js 25 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Node.js 25 changed how extensionless files are loaded via require() — they are now treated as JavaScript modules rather than JSON, causing the .eslintrc file to fail with "Unexpected token ':'". Additionally, ESLint 8 in newer environments tries to ESM-import config files passed via --config, which breaks JSON loading. Fixes: - Rename .eslintrc → .eslintrc.json so require() uses the JSON loader - Remove the JS line comment (invalid JSON) from the config - Set ESLINT_USE_FLAT_CONFIG=false in lint scripts to force legacy config mode, preventing ESLint from trying to ESM-import the config file - Remove explicit --config flag; ESLint discovers .eslintrc.json by convention Co-Authored-By: Claude Fable 5 --- .eslintrc => .eslintrc.json | 1 - package.json | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) rename .eslintrc => .eslintrc.json (98%) diff --git a/.eslintrc b/.eslintrc.json similarity index 98% rename from .eslintrc rename to .eslintrc.json index 1a434bd5..1c411dbb 100644 --- a/.eslintrc +++ b/.eslintrc.json @@ -123,7 +123,6 @@ } ], "no-console": "error", - //"linebreak-style": ["error", "unix"], "linebreak-style": 0, "semi": [2, "always"], "arrow-spacing": [ diff --git a/package.json b/package.json index af56d7f6..695b34b3 100644 --- a/package.json +++ b/package.json @@ -114,8 +114,8 @@ "generate:mcp:docs": "cd mcp-server && npm ci && npm run bundle-docs", "generate:commands": "npm run generate:readme:commands", "generate:readme:toc": "markdown-toc -i README.md && markdown-toc -i ./docs/usage.md && markdown-toc -i ./docs/migrations/v0.md && markdown-toc -i ./docs/README.md && markdown-toc -i ./docs/contributing.md ", - "lint": "eslint --max-warnings 0 --config .eslintrc . && npm run typecheck:test", - "lint:fix": "eslint --max-warnings 0 --config .eslintrc . --fix && npm run typecheck:test", + "lint": "ESLINT_USE_FLAT_CONFIG=false eslint --max-warnings 0 . && npm run typecheck:test", + "lint:fix": "ESLINT_USE_FLAT_CONFIG=false eslint --max-warnings 0 . --fix && npm run typecheck:test", "format": "prettier \"./src/**/*.ts\" --write", "pack:all": "npm run pack:macos && npm run pack:linux && npm run pack:tarballs && npm run pack:windows", "pack:macos": "oclif pack macos && npm run pack:rename",