Commit 099bcb4
Update
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: fd330a514ad991de379ddadc2295190e75ccb663eslint-plugin-ft-flow to fix ESLint v9 issue (#55628)1 parent d381a99 commit 099bcb4
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4302 | 4302 | | |
4303 | 4303 | | |
4304 | 4304 | | |
| 4305 | + | |
| 4306 | + | |
| 4307 | + | |
| 4308 | + | |
| 4309 | + | |
| 4310 | + | |
| 4311 | + | |
| 4312 | + | |
4305 | 4313 | | |
4306 | 4314 | | |
4307 | 4315 | | |
| |||
0 commit comments