Skip to content

feat: ESLint 10 support, flat config only - #285

Draft
retyui wants to merge 2 commits into
mainfrom
feat/v16-eslint-10-flat-only
Draft

retyui wants to merge 2 commits into
mainfrom
feat/v16-eslint-10-flat-only

Conversation

@retyui

@retyui retyui commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Eslint deprecated v9 and v8, only v10 is supported, see: https://eslint.org/version-support/

@callstack/eslint-config v15 doesn't work with ESLint 10. This PR prepares v16.0.0: ESLint 10 support, flat config only, and all dependencies updated to their latest versions.

Breaking changes

  • Flat config only. Removed the eslintrc entry points and the *.factory.js helpers. Each config is now a single flat-config file: node.js, react.js, react-native.js.

    • Import paths: @callstack/eslint-config (React Native), @callstack/eslint-config/react, @callstack/eslint-config/node.
    • The v15 *.flat.js paths still work as aliases through the exports map.
  • ESLint ^10.0.0 only. ESLint 8 and 9 are dropped.

  • Node.js ^22.18.0 || >=24.11.0. Babel 8 requires it.

  • eslint-plugin-import → eslint-plugin-import-x. The original has no ESLint 10 support. Rules are renamed from import/* to import-x/*. (Switched to eslint-plugin-import-x due to ESLint 10 compatibility delays and project maintenance friction in eslint-plugin-import#3227.)

  • eslint-plugin-flowtype → eslint-plugin-ft-flow. The original is unmaintained and tied to Babel 7. Rules are renamed from flowtype/* to ft-flow/*. (Unmaintained for 5 years in eslint-plugin-flowtype)

  • Babel 8 parser. This is the only @babel/eslint-parser release that supports ESLint 10. The project's Babel config is no longer loaded, because React Native's preset is still on Babel 7. JSX and Flow are enabled through parserOpts.plugins instead.

  • TypeScript uses parserOptions.projectService: true instead of project: './tsconfig.json'.

Other changes

  • eslint-plugin-ft-flow, eslint-plugin-react and eslint-plugin-react-native call context APIs that ESLint 10 removed. They are wrapped with fixupPluginRules from @eslint/compat.
  • @eslint/js is now a direct dependency. Previously it resolved only from the test workspace.
  • Tests: the ESLint 8 and 9 workspaces are replaced by a single ESLint 10 workspace.
  • README rewritten for flat config, with a "Migrating from v15" section.

Test plan

  • yarn test passes on ESLint 10.

@retyui retyui changed the title feat!: v16 – ESLint 10 support, flat config only feat: ESLint 10 support, flat config only Oct 6, 2026
@retyui
retyui marked this pull request as draft October 6, 2026 21:51
Comment thread react-native.js
},
plugins: {
// eslint-plugin-react-native relies on context APIs removed in ESLint 10
'react-native': fixupPluginRules(pluginReactNative),

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@retyui

retyui commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Testing on small project (npx @eslint/config-inspector):

Screenshot 2026-10-07 at 10 26 36 Screenshot 2026-10-07 at 10 27 03

@retyui
retyui force-pushed the feat/v16-eslint-10-flat-only branch from f89a06c to 7ee69e3 Compare October 7, 2026 08:49
@retyui
retyui requested a balanced review from Copilot October 7, 2026 08:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Several bundled plugins reject ESLint 10 in their peer ranges, causing strict npm installations to fail.

Review effort: Balanced
Findings: 1 High severity · 1 Low severity

Open (2)
What changed in this PR

Prepares v16 with ESLint 10 support and flat configuration as the sole format.

Changes:

  • Consolidates Node, React, and React Native flat configs.
  • Upgrades ESLint plugins, parsers, and runtime requirements.
  • Replaces legacy test workspaces and updates migration documentation.
File Description
.github/​workflows/​test.yml Tests on Node.js 22.
README.md Documents flat config and migration.
package.json Defines v16 exports and dependencies.
node.js Implements the flat Node.js config.
node.flat.js Removes obsolete flat wrapper.
node.factory.js Removes legacy config factory.
react.js Implements the flat React config.
react.flat.js Removes obsolete flat wrapper.
react.factory.js Removes legacy config factory.
react-native.js Implements the flat React Native config.
react-native.flat.js Removes obsolete flat wrapper.
react-native.factory.js Removes legacy config factory.
test/​package.json Targets ESLint 10 and TypeScript 5.9.
test/​index.js Migrates import rule names.
test/​index.tsx Migrates TypeScript import rule names.
test/​eslint-v8/​.eslintrc.js Removes ESLint 8 configuration.
test/​eslint-v8/​package.json Removes ESLint 8 workspace.
test/​eslint-v9/​package.json Removes ESLint 9 workspace.
test/​eslint-v10/​package.json Adds ESLint 10 workspace.
test/​eslint-v10/​eslint.config.mjs Uses the root package export.
test/​rules/​core.js Exercises core rules.
test/​rules/​flow.js Exercises ft-flow rules.
test/​rules/​imports.js Exercises import-x rules.
test/​rules/​promise.js Exercises promise rules.
test/​rules/​react.js Exercises JavaScript React rules.
test/​rules/​react.tsx Exercises TypeScript React rules.
test/​rules/​react-native.js Exercises React Native rules.
test/​rules/​react-native.tsx Exercises typed React Native rules.
test/​rules/​typescript.ts Exercises TypeScript rules.
test/​rules/​__tests__/​jest.test.js Exercises JavaScript Jest rules.
test/​rules/​__tests__/​jest.test.ts Exercises TypeScript Jest rules.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread package.json
"@typescript-eslint/eslint-plugin": "^8.71.1",
"@typescript-eslint/parser": "^8.71.1",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-ft-flow": "^3.0.11",
Comment thread README.md
- **TypeScript** now uses `projectService` instead of `project: './tsconfig.json'`.
- **Babel config is no longer read** when parsing JS files (see [JavaScript and Flow](#javascript-and-flow)).
- **ESLint 10** is required. Since ESLint 8 and 9 were deprecated.
- **Node.js 22.18+** is required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants