Update eslint-plugin-ft-flow to fix ESLint v9 issue (#55628)

Summary:
When trying to use the `react-native/eslint-config` with ESLint v9, we get an issue with the `eslint-plugin-ft-flow`:

```bash
Oops! Something went wrong! :(

ESLint: 9.39.2

TypeError: Error while loading rule 'ft-flow/define-flow-type': context.getAllComments is not a function
```

Looking into it, I noticed that our current version (`^2.0.0`) does not support ESLint v9. Only in version `^3.0.11` it show as a valid peer dependency version.

So, although we do have a flat config, we don't support ESLint v9 out of the box.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General] [Fixed] - Fixed the issue when using the flat config with ESLint v9.

Pull Request resolved: https://github.com/react/react-native/pull/55628

Test Plan:
I've made a repro repo: https://github.com/tcK1/Repro-ESLint9-RN

Updated the ESLint version to v9 and added the `eslint-plugin-ft-flow` version in the `resolutions` configuration in the `package.json`.

In this state, running `yarn eslint .` works as expected. To reproduce the issue, remove the `resolutions` field (and run `yarn install` again to update the dependencies) and run the command again.

Reviewed By: cipolleschi

Differential Revision: D121042705

Pulled By: cortinico

fbshipit-source-id: fd330a514ad991de379ddadc2295190e75ccb663
This commit is contained in:
Kaic Bastidas
2026-09-22 08:17:41 -07:00
committed by meta-codesync[bot]
parent d381a99491
commit 099bcb444e
2 changed files with 9 additions and 1 deletions
@@ -32,7 +32,7 @@
"@typescript-eslint/parser": "^8.59.2",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-ft-flow": "^2.0.1",
"eslint-plugin-ft-flow": "^3.0.11",
"eslint-plugin-jest": "^29.0.1",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
+8
View File
@@ -4302,6 +4302,14 @@ eslint-plugin-ft-flow@^2.0.1:
lodash "^4.17.21"
string-natural-compare "^3.0.1"
eslint-plugin-ft-flow@^3.0.11:
version "3.0.11"
resolved "https://registry.yarnpkg.com/eslint-plugin-ft-flow/-/eslint-plugin-ft-flow-3.0.11.tgz#64654dad277104fc45aef8d009c4a51057ea1250"
integrity sha512-6ZJ4KYGYjIosCcU883zBBT1nFsKP58xrTOwguiw3/HRq0EpYAyhrF1nCGbK7V23cmKtPXMpDfl8qPupt5s5W8w==
dependencies:
lodash "^4.17.21"
string-natural-compare "^3.0.1"
eslint-plugin-import@^2.32.0:
version "2.32.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz#602b55faa6e4caeaa5e970c198b5c00a37708980"