Repository navigation
chore: Migrate to ESLint 10 flat config with @feathers-community/eslint-config (v6) - #3721
Open
fratzinger wants to merge 2 commits into
Open
fratzinger wants to merge 2 commits into
fratzinger wants to merge 2 commits into
Conversation
Node.js 20 is end-of-life and the development tooling (ESLint plugins) already requires newer versions. All packages now require Node.js 24 or later and CI tests on Node.js 24 and 26. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt-config (v6) - Replace the legacy `.eslintrc.js` (which required `ESLINT_USE_FLAT_CONFIG=false` and no longer works with ESLint 10) with `eslint.config.mjs` based on `@feathers-community/eslint-config` - Keep the existing `.prettierrc` formatting options - Disable `e18e/prefer-spread-syntax` (`[].concat(x)` and `[...x]` behave differently when `x` is not an array) and the e18e rules that require ES2022+ since Feathers targets ES2020 (browsers, React Native) - Apply the autofixes (type imports, `node:` protocol, `assert.ok`, ...) and fix the remaining issues by hand (empty catch blocks, `hasOwnProperty`, template arguments) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 21, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The legacy
.eslintrc.jsonly worked because theeslintscript forcedESLINT_USE_FLAT_CONFIG=false, and ESLint 10 no longer supports that. This PR moves to ESLint 10 with a flat config based on@feathers-community/eslint-config:The overrides in
eslint.config.mjsare:.prettierrc(printWidth: 110,trailingComma: none) still applies, so files are not reformatted.e18e/prefer-spread-syntaxis off. Its autofix turnsa.concat(b)into[...a, b], which is not the same whenbis an array. With the autofix applied, 35 tests failed.e18e/prefer-object-has-own,prefer-array-at,prefer-array-to-sortedandprefer-array-to-reversedare off. They require ES2022+, and Feathers targets ES2020 (browsers, React Native).e18e/prefer-static-regexis off for tests.packages/*/bin/**gets Node globals, andimport-x/no-unresolvedis off there. The bin scripts import the compiledlib/, which does not exist yet when CI lints, since lint runs before compile.The code changes in the other files are the safe autofixes: separate type imports, the
node:protocol andassert.ok. A few issues are fixed by hand:catchblocks now use optional catch binding and a commenthasOwnPropertyis called throughObject.prototype_ctxChannelexport is annotatedThere are no behaviour changes.
Depends on #3720.
eslint-plugin-unicornrequires Node.js 22 or later, and CI on Node.js 20 fails while loading the config. Until #3720 is merged, this PR also shows its commit.Evidence
npm run eslintonly works with the deprecated eslintrc mode on ESLint 9. On Node.js 20 the new config fails to load withTypeError: mapTypes.union is not a function(eslint-plugin-unicorn).After:
eslint packages --max-warnings 0reports no errors and no warnings.npm run lintleaves the tree unchanged. In a fresh checkout without build output,npm ci && npm testpasses on Node.js 24.16 and 26.10 withTests 497 passed | 1 skipped, and CI is green on 24 and 26.Merge Danger
Door: two-way
Blast Radius: small
The PR touches 65 files, but outside the dev tooling every change is mechanical, mostly import statements, and the test suite passes unchanged. Most of the added lines are in
package-lock.json. Open PRs againstv6that touch the same imports may need a rebase.🤖 Generated with Claude Code