Uh oh!
There was an error while loading. Please reload this page.
Add support for Flat Config (eslint v9) - #54297
Conversation
Hi @pipopotamasu! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
| "eslint-plugin-jest": "^29.0.1", | ||
| "eslint-plugin-react": "^7.30.1", | ||
| "eslint-plugin-react-hooks": "^5.2.0", | ||
| "eslint-plugin-react-native": "^4.0.0" |
There was a problem hiding this comment.
Upgraded eslint-plugin-react-native because v4 doesn't support eslint v9
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
huntie
left a comment
There was a problem hiding this comment.
LGTM and have confirmed that the eslint-plugin-react-native 4→5 diff is structural only.
(Sidenote: Wow, we should both aim to upstream this pkg and simplify our config. But let's not change this now.)
pipopotamasu
commented
Nov 1, 2025
@huntie Thank you for your quick review and approval. Looks like some Facebook internal CI checks failed. Feel free to tell me if you want me to fix something to pass these checks |
huntie
commented
Nov 3, 2025
@pipopotamasu Working on it (any dep bumps need re-syncing/alignment within our main repo). I'll reach out if there are any functional errors from this change. |
react-native-bot
commented
Nov 8, 2025
|
pipopotamasu
commented
Nov 8, 2025
Hmm, danger is flagging the merge commit of |
react-native-bot
commented
Nov 13, 2025
This pull request was successfully merged by @pipopotamasu in 1859245 When will my fix make it into a release? | How to file a pick request? |
Summary: Implements: react/react-native#42996 Add support for Flat config (eslint v9) to `eslint-config-react-native`. To achieve this, I created `packages/eslint-config-react-native/flat.js` to export flat config as well as maintain legacy config for backward compatibility. I recognize we have had [the PR for supporting Flat config](react/react-native#42996) already, but it looks stale and doesn't seem likely to move forward. That's why I created this PR. I also updated `eslint-plugin-react-native` and `eslint-plugin-specs` so that they comply with the current eslint plugin format. ## Changelog: [GENERAL] [ADDED] - Add support for Flat Config (eslint v9) Pull Request resolved: react/react-native#54297 Test Plan: 1. Pull this branch into your local machine 2. `cd packages/eslint-config-react-native` 3. `yarn link` 4. Clone https://github.com/pipopotamasu/rn-eslint-config-test in your local machine 5. `cd path/to/rn-eslint-config-test` 6. `yarn install` 7. `yarn link "react-native/eslint-config"` 8. `yarn lint` 9. Confirm that eslint rules from `react-native/eslint-config` are applied <img width="1470" height="628" alt="image" src="https://github.com/user-attachments/assets/955fd655-8a79-4dd4-9031-e505d218d63a" /> Reviewed By: vzaidman Differential Revision: D85851077 Pulled By: huntie fbshipit-source-id: 9c78ecc4f5c3b10175a89417628b599735f95215
Summary: Implements: react/react-native#42996 Add support for Flat config (eslint v9) to `eslint-config-react-native`. To achieve this, I created `packages/eslint-config-react-native/flat.js` to export flat config as well as maintain legacy config for backward compatibility. I recognize we have had [the PR for supporting Flat config](react/react-native#42996) already, but it looks stale and doesn't seem likely to move forward. That's why I created this PR. I also updated `eslint-plugin-react-native` and `eslint-plugin-specs` so that they comply with the current eslint plugin format. ## Changelog: [GENERAL] [ADDED] - Add support for Flat Config (eslint v9) Pull Request resolved: react/react-native#54297 Test Plan: 1. Pull this branch into your local machine 2. `cd packages/eslint-config-react-native` 3. `yarn link` 4. Clone https://github.com/pipopotamasu/rn-eslint-config-test in your local machine 5. `cd path/to/rn-eslint-config-test` 6. `yarn install` 7. `yarn link "react-native/eslint-config"` 8. `yarn lint` 9. Confirm that eslint rules from `react-native/eslint-config` are applied <img width="1470" height="628" alt="image" src="https://github.com/user-attachments/assets/955fd655-8a79-4dd4-9031-e505d218d63a" /> Reviewed By: vzaidman Differential Revision: D85851077 Pulled By: huntie fbshipit-source-id: 9c78ecc4f5c3b10175a89417628b599735f95215
Summary: Implements: react/react-native#42996 Add support for Flat config (eslint v9) to `eslint-config-react-native`. To achieve this, I created `packages/eslint-config-react-native/flat.js` to export flat config as well as maintain legacy config for backward compatibility. I recognize we have had [the PR for supporting Flat config](react/react-native#42996) already, but it looks stale and doesn't seem likely to move forward. That's why I created this PR. I also updated `eslint-plugin-react-native` and `eslint-plugin-specs` so that they comply with the current eslint plugin format. ## Changelog: [GENERAL] [ADDED] - Add support for Flat Config (eslint v9) Pull Request resolved: react/react-native#54297 Test Plan: 1. Pull this branch into your local machine 2. `cd packages/eslint-config-react-native` 3. `yarn link` 4. Clone https://github.com/pipopotamasu/rn-eslint-config-test in your local machine 5. `cd path/to/rn-eslint-config-test` 6. `yarn install` 7. `yarn link "react-native/eslint-config"` 8. `yarn lint` 9. Confirm that eslint rules from `react-native/eslint-config` are applied <img width="1470" height="628" alt="image" src="https://github.com/user-attachments/assets/955fd655-8a79-4dd4-9031-e505d218d63a" /> Reviewed By: vzaidman Differential Revision: D85851077 Pulled By: huntie fbshipit-source-id: 9c78ecc4f5c3b10175a89417628b599735f95215
Summary:
Implements: #42996
Add support for Flat config (eslint v9) to
eslint-config-react-native. To achieve this, I createdpackages/eslint-config-react-native/flat.jsto export flat config as well as maintain legacy config for backward compatibility. I recognize we have had the PR for supporting Flat config already, but it looks stale and doesn't seem likely to move forward. That's why I created this PR.I also updated
eslint-plugin-react-nativeandeslint-plugin-specsso that they comply with the current eslint plugin format.Changelog:
[GENERAL] [ADDED] - Add support for Flat Config (eslint v9)
Test Plan:
cd packages/eslint-config-react-nativeyarn linkcd path/to/rn-eslint-config-testyarn installyarn link "@react-native/eslint-config"yarn lint@react-native/eslint-configare applied