Skip to content

[eslint-plugin-react-hooks] update fbsource build #33104

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

Merged
merged 1 commit into from
May 2, 2025

Conversation

kassens
Copy link
Member

@kassens kassens commented May 2, 2025

In order to sync the lint rules directly to internal, include the eslint plugin in the build output for fbsource.

@kassens kassens requested review from Copilot and poteto May 2, 2025 19:45
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label May 2, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the build output for fbsource by syncing the lint rules directly via including the eslint-plugin-react-hooks in the build artifacts.

  • Updated the workflow to copy rather than move eslint-plugin-react-hooks for the standard build.
  • Introduced a separate handling for fbsource that includes the full package (including package.json) for dependency management.

In order to sync the lint rules directly to internal, include the eslint plugin in the build output for fbsource.
@react-sizebot
Copy link

Comparing: 4c4a57c...69ca0d2

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB = 1.83 kB 1.83 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 528.27 kB 528.27 kB = 93.14 kB 93.14 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB = 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 633.90 kB 633.90 kB = 111.33 kB 111.33 kB
facebook-www/ReactDOM-prod.classic.js = 671.68 kB 671.68 kB = 117.77 kB 117.77 kB
facebook-www/ReactDOM-prod.modern.js = 661.96 kB 661.96 kB = 116.21 kB 116.21 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 69ca0d2

@kassens kassens requested a review from Copilot May 2, 2025 20:02
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the fbsource build process to include the eslint-plugin-react-hooks in the build output, ensuring internal sync with lint rules.

  • Replaces file moves with file copies for eslint-plugin-react-hooks.
  • Adds a new step to copy the entire eslint-plugin-react-hooks package (including package.json) to the fbsource vendor folder.

@kassens kassens merged commit 0d695be into facebook:main May 2, 2025
239 checks passed
jorge-cab pushed a commit that referenced this pull request May 2, 2025
In order to sync the lint rules directly to internal, include the eslint
plugin in the build output for fbsource.
rickhanlonii added a commit that referenced this pull request May 15, 2025
Noop detection for xplat syncs broke because `eslint-plugin-react-hooks`
uses versions like:

- `0.0.0-experimental-d85f86cf-20250514`

But xplat expects them to be of the form:

- `19.2.0-native-fb-63d664b2-20250514`

This PR fixes the noop by ignoring
`eslint-plugin-react-hooks/package.json` changes. This means we won't
create a sync if only that package.json changes, but that should be rare
and we can follow up with better detection if needed.

[Example failed
action](https://github.com/facebook/react/actions/runs/15032346805/job/42247414406):

<img width="1031" alt="Screenshot 2025-05-15 at 11 31 17 AM"
src="https://github.com/user-attachments/assets/d902079c-1afe-4e18-af1d-25e60e28929e"
/>

I believe the regression was caused by
#33104
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants