Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint config & plugin packages - prep for monorepo RFC #34581

Closed
wants to merge 1 commit into from

Conversation

afoxman
Copy link
Contributor

@afoxman afoxman commented Sep 2, 2022

Summary

The monorepo RFC calls for renaming:

  • @react-native-community/eslint-config -> @react-native/eslint-config
  • @react-native-community/eslint-plugin -> @react-native/eslint-plugin

It also calls for the versions to be aligned with the rest of main -- currently 0.72.0.

Changelog

[General][Changed] - Renamed @react-native-community/eslint-config to @react-native/eslint-config v0.72.0 to align with other packages
[General][Changed] - Renamed @react-native-community/eslint-plugin to @react-native/eslint-plugin v0.72.0 to align with other packages

Test Plan

First test is to run yarn lint, and verify that output matches before and after this change.

Second test is to change the ESLint config to use the "old" packages (under @react-native-commnuity) and run yarn lint to make sure that they work as expected. This is what customers will experience, until they manually move to the new ESLint packages.

@afoxman afoxman requested a review from hramos as a code owner September 2, 2022 12:34
@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 Sep 2, 2022
@afoxman
Copy link
Contributor Author

afoxman commented Sep 2, 2022

cc @cortinico Monorepo PR

@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 Sep 2, 2022
@afoxman
Copy link
Contributor Author

afoxman commented Sep 2, 2022

There are some errors from CircleCI about the new packages not being in NPM yet they are referenced as dependencies in the old packages. If you'd like, I can split this up so the new packages are published first, then land that, and make a 2nd PR to update the old packages, making them point to the new ones. I didn't do that initially because I know this is going to cause a lot of internal work, and I thought 2 PRs might increase that workload.

@analysis-bot
Copy link

analysis-bot commented Sep 2, 2022

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,103,561 +0
android hermes armeabi-v7a 6,471,886 +0
android hermes x86 7,521,203 +0
android hermes x86_64 7,380,081 +0
android jsc arm64-v8a 8,968,399 +0
android jsc armeabi-v7a 7,699,505 +0
android jsc x86 9,030,706 +0
android jsc x86_64 9,508,749 +0

Base commit: e680018
Branch: main

@analysis-bot
Copy link

analysis-bot commented Sep 2, 2022

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

Base commit: e680018
Branch: main

@afoxman
Copy link
Contributor Author

afoxman commented Sep 9, 2022

cc @cipolleschi for tracking

@kelset kelset added the Tech: Monorepo For PRs that are related to the monorepo infra label Sep 12, 2022
@cortinico cortinico mentioned this pull request Sep 14, 2022
11 tasks
@cortinico
Copy link
Contributor

Hey @afoxman
Thanks for sending this over.

I've posted an update on the Monorepo effort here:

I'm not entirely sure how we want to handle this (@kelset has a stronger opinion I believe). I believe we probably don't want to keep wrapper packages for the older package names (it would be quite of an overkill, as we'll have to do it for all the packages).

I would suggest we downscale the PR to just renaming + bumping the packages.
Also, the folder renaming and the BUCK target update is not needed (we decided to defer this to streamline the work and make it easier to import those PRs).

@hoxyq
Copy link
Contributor

hoxyq commented Nov 10, 2022

Hey @afoxman,

Thanks for working on this, I am now planning to continue your work this and #34581 PRs. There are some changes that we need to introduce before merging this.

Could you please share if this is okay for you?

@afoxman
Copy link
Contributor Author

afoxman commented Nov 10, 2022

Hey @afoxman,

Thanks for working on this, I am now planning to continue your work this and #34581 PRs. There are some changes that we need to introduce before merging this.

Could you please share if this is okay for you?

Hi @hoxyq, definitely! Thank you for picking this up for me and pushing the monorepo forward.

@facebook-github-bot
Copy link
Contributor

@hoxyq has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

hoxyq pushed a commit to hoxyq/react-native that referenced this pull request Nov 23, 2022
Summary:
The [monorepo RFC](react-native-community/discussions-and-proposals#480) calls for renaming:

* `react-native-community/eslint-config` -> `react-native/eslint-config`
* `react-native-community/eslint-plugin` -> `react-native/eslint-plugin`

It also calls for the versions to be aligned with the rest of main -- currently `0.71.0`.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

General Added - Added a new package `react-native/eslint-config` and migrated ESLint configuration into it from `react-native-community/eslint-config`
General Added - Added a new package `react-native/eslint-plugin` and migrated ESLint plugins into it from `react-native-community/eslint-plugin`
General Changed - Migrated contents of `react-native-community/eslint-config` into `react-native/eslint-config`
General Changed - Migrated contents of `react-native-community/eslint-plugin` into `react-native/eslint-plugin`

Pull Request resolved: facebook#34581

Test Plan:
First test is to run `yarn lint`, and verify that output matches before and after this change.

Second test is to change the ESLint config to use the "old" packages (under `react-native-commnuity`) and run `yarn lint` to make sure that they work as expected. This is what customers will experience, until they manually move to the new ESLint packages.

Differential Revision: D41495332

Pulled By: hoxyq

fbshipit-source-id: 36e756333ab0711927927c18af736c0931dbf9b4
@hoxyq hoxyq force-pushed the monorepo branch 5 times, most recently from 977a213 to 7972310 Compare November 24, 2022 12:05
@pull-bot
Copy link

PR build artifact for 7972310 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@pull-bot
Copy link

PR build artifact for 7972310 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@facebook-github-bot
Copy link
Contributor

@hoxyq has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@pull-bot
Copy link

PR build artifact for c657aad is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@pull-bot
Copy link

PR build artifact for c657aad is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@pull-bot
Copy link

PR build artifact for 2915e79 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@pull-bot
Copy link

PR build artifact for 2915e79 is ready.
To use, download tarball from "Artifacts" tab in this CircleCI job then run yarn add <path to tarball> in your React Native project.

@facebook-github-bot
Copy link
Contributor

@hoxyq has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @afoxman in 5aead70.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Nov 25, 2022
@mm-webx
Copy link

mm-webx commented Dec 1, 2022

Its not working:
yarn add --dev eslint prettier @react-native/eslint-config

error An unexpected error occurred: "https://registry.npmjs.org/@react-native%2feslint-config: Not found".

@kelset
Copy link
Contributor

kelset commented Dec 1, 2022

@mm-webx I don't think it's expected to work yet, these new versions still need to be published. It will take time, for now you are not supposed to migrate to it. (0.71 will not use these new versions)

@hoxyq
Copy link
Contributor

hoxyq commented Dec 1, 2022

Its not working: yarn add --dev eslint prettier @react-native/eslint-config

error An unexpected error occurred: "https://registry.npmjs.org/@react-native%2feslint-config: Not found".

Hey @mm-webx, @kelset is correct, before we publish this package you can use @react-native-community/eslint-config, the instruction for it is here

OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
The [monorepo RFC](react-native-community/discussions-and-proposals#480) calls for renaming:

* `react-native-community/eslint-config` -> `react-native/eslint-config`
* `react-native-community/eslint-plugin` -> `react-native/eslint-plugin`

It also calls for the versions to be aligned with the rest of main -- currently `0.72.0`.

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

[General][Changed] - Renamed `react-native-community/eslint-config` to `react-native/eslint-config` v0.72.0 to align with other packages
[General][Changed] - Renamed `react-native-community/eslint-plugin` to `react-native/eslint-plugin` v0.72.0 to align with other packages

Pull Request resolved: facebook#34581

Test Plan:
First test is to run `yarn lint`, and verify that output matches before and after this change.

Second test is to change the ESLint config to use the "old" packages (under `react-native-commnuity`) and run `yarn lint` to make sure that they work as expected. This is what customers will experience, until they manually move to the new ESLint packages.

Reviewed By: cortinico

Differential Revision: D41520500

Pulled By: hoxyq

fbshipit-source-id: a61e5ae15d5aaf11f0143a3b0257a60a03b1550b
satya164 pushed a commit to callstack/react-native-builder-bob that referenced this pull request Sep 1, 2023
### Summary

Fixes #443 
Replaced `@react-native-community/eslint-config` with
`@react-native/eslint-config`. Please see the PR that changes the name
on the React Native repository
[here](facebook/react-native#34581)

### Test plan

1. Create a new React Native library
2. cd into the library you have created.
3. run `yarn lint`
4. Make sure linting works properly.
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. Merged This PR has been merged. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. Tech: Monorepo For PRs that are related to the monorepo infra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants