mirror of
https://github.com/react/react-native.git
synced 2026-09-28 13:23:09 +08:00
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
50 lines
1.4 KiB
JSON
50 lines
1.4 KiB
JSON
{
|
|
"name": "@react-native/eslint-config",
|
|
"version": "0.87.0-main",
|
|
"description": "ESLint config for React Native",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/react/react-native.git",
|
|
"directory": "packages/eslint-config-react-native"
|
|
},
|
|
"homepage": "https://github.com/react/react-native/tree/HEAD/packages/eslint-config-react-native#readme",
|
|
"keywords": [
|
|
"eslint",
|
|
"config",
|
|
"react-native"
|
|
],
|
|
"bugs": "https://github.com/react/react-native/issues",
|
|
"engines": {
|
|
"node": "^22.13.0 || ^24.3.0 || >= 26.0.0"
|
|
},
|
|
"main": "index.js",
|
|
"exports": {
|
|
".": "./index.js",
|
|
"./flat": "./flat.js"
|
|
},
|
|
"files": ["README.md", "flat.js", "index.js", "shared.js"],
|
|
"dependencies": {
|
|
"@babel/core": "^7.25.2",
|
|
"@babel/eslint-parser": "^7.25.1",
|
|
"@react-native/eslint-plugin": "0.87.0-main",
|
|
"@typescript-eslint/eslint-plugin": "^8.59.2",
|
|
"@typescript-eslint/parser": "^8.59.2",
|
|
"eslint-config-prettier": "^8.5.0",
|
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
"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",
|
|
"eslint-plugin-react-native": "^5.0.0"
|
|
},
|
|
"peerDependencies": {
|
|
"eslint": "^8.0.0 || ^9.0.0",
|
|
"prettier": ">=2"
|
|
},
|
|
"devDependencies": {
|
|
"eslint": "^8.57.0",
|
|
"prettier": "3.9.4"
|
|
}
|
|
}
|