Skip to content

Commit 099bcb4

Browse files
tcK1meta-codesync[bot]
authored andcommitted
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: #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
1 parent d381a99 commit 099bcb4

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎packages/eslint-config-react-native/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@typescript-eslint/parser": "^8.59.2",
3333
"eslint-config-prettier": "^8.5.0",
3434
"eslint-plugin-eslint-comments": "^3.2.0",
35-
"eslint-plugin-ft-flow": "^2.0.1",
35+
"eslint-plugin-ft-flow": "^3.0.11",
3636
"eslint-plugin-jest": "^29.0.1",
3737
"eslint-plugin-react": "^7.37.5",
3838
"eslint-plugin-react-hooks": "^7.0.1",

‎yarn.lock‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4302,6 +4302,14 @@ eslint-plugin-ft-flow@^2.0.1:
43024302
lodash "^4.17.21"
43034303
string-natural-compare "^3.0.1"
43044304

4305+
eslint-plugin-ft-flow@^3.0.11:
4306+
version "3.0.11"
4307+
resolved "https://registry.yarnpkg.com/eslint-plugin-ft-flow/-/eslint-plugin-ft-flow-3.0.11.tgz#64654dad277104fc45aef8d009c4a51057ea1250"
4308+
integrity sha512-6ZJ4KYGYjIosCcU883zBBT1nFsKP58xrTOwguiw3/HRq0EpYAyhrF1nCGbK7V23cmKtPXMpDfl8qPupt5s5W8w==
4309+
dependencies:
4310+
lodash "^4.17.21"
4311+
string-natural-compare "^3.0.1"
4312+
43054313
eslint-plugin-import@^2.32.0:
43064314
version "2.32.0"
43074315
resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz#602b55faa6e4caeaa5e970c198b5c00a37708980"

0 commit comments

Comments
 (0)