Skip to content

Replaced babel-eslint with @babel/eslint-parser#32822

Closed
clintonb wants to merge 6 commits into
facebook:mainfrom
Afri-exchange:clintonb/replace-babel-eslint
Closed

Replaced babel-eslint with @babel/eslint-parser#32822
clintonb wants to merge 6 commits into
facebook:mainfrom
Afri-exchange:clintonb/replace-babel-eslint

Conversation

@clintonb
Copy link
Copy Markdown

@clintonb clintonb commented Jan 2, 2022

Summary

babel-eslint is no longer updated. We now use its replacement library.

Changelog

[Internal] [Changed] - Replaced babel-eslint with @babel/eslint-parser

Test Plan

  1. Install package:
yarn add -D 'https://gitpkg.now.sh/Afri-exchange/react-native/packages/eslint-config-react-native-community?clintonb/replace-babel-eslint'
  1. Verify ESLint runs successfully.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

Hi @clintonb!

Thank you for your pull request and welcome to our community.

Action Required

In 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.

Process

In 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 CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

babel-eslint is no longer updated. We now use its replacement library.
@clintonb clintonb force-pushed the clintonb/replace-babel-eslint branch from 2732707 to efe5676 Compare January 2, 2022 11:00
@clintonb
Copy link
Copy Markdown
Author

clintonb commented Jan 2, 2022

Related: #32431

@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: e22b760
Branch: main

@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,291,459 +0
android hermes armeabi-v7a 7,625,164 +0
android hermes x86 8,764,282 +0
android hermes x86_64 8,700,837 +0
android jsc arm64-v8a 9,679,790 +0
android jsc armeabi-v7a 8,670,191 +0
android jsc x86 9,638,128 +0
android jsc x86_64 10,232,281 +0

Base commit: e22b760
Branch: main

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 2, 2022
@facebook-github-bot
Copy link
Copy Markdown
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-bot facebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Jan 2, 2022
@clintonb
Copy link
Copy Markdown
Author

clintonb commented Jan 2, 2022

It's not clear to me how to fix the lingering issues. I suspect the flow plugin is not being properly loaded for the test_js failures. The test_windows tests may be have the same issue, and/or be a bit too brittle in their error expectations.

My branch meets the needs of my project and I've already spent a few hours digging into these tests to no avail, so I may not invest any more time on this. Feedback, or contributions, are welcome.

Edit: Upgrading to "eslint-plugin-flowtype": "^8.0.3", did not help.

@skdrew
Copy link
Copy Markdown

skdrew commented Mar 17, 2022

Hi @clintonb, I've been taking a look at this PR to see if I can help out as it's something I'd also like to see merged at some point.

I haven't fully solved the tests failing but I think I've made some progress. You're right that the flow plugin isn't being loaded, on my local branch (https://github.com/skdrew/react-native/tree/chore/update-eslint-config-dependencies) I've added some extra config that does load it - or at least it's supposed to, it's unable to resolve the plugin in the paths but it's a step closer!

I've also tried reference the flowtype plugin directly, but I get Parsing error: Plugin/Preset files are not allowed to export objects, only functions. when doing this. I've also stuck to v7.0.0 of the flowtype plugin as that's the last version that works with eslint v7.

Not sure if this helps at all, I'll keep poking around to see if I can get it sorted but I thought you might be interested to know.

@cortinico
Copy link
Copy Markdown
Contributor

Closing as this was superseeded by #34020
Thanks for sending this over @clintonb though 🙏

@cortinico cortinico closed this Jun 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants