8000 [eslint-plugin-react-hooks] updates for component syntax by kassens · Pull Request #33089 · facebook/react · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[eslint-plugin-react-hooks] updates for component syntax #33089

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 1, 2025

Adds support for Flow's component and hook syntax. docs

@react-sizebot
Copy link
react-sizebot commented May 1, 2025

Comparing: f739642...c6d62a4

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
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +4.55% 2,015.02 kB 2,106.71 kB +5.25% 301.70 kB 317.54 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +4.55% 2,015.02 kB 2,106.71 kB +5.25% 301.70 kB 317.54 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +4.55% 2,015.20 kB 2,106.89 kB +5.25% 301.72 kB 317.57 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +4.53% 2,019.61 kB 2,111.16 kB +5.24% 302.66 kB 318.50 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +4.53% 2,019.61 kB 2,111.16 kB +5.24% 302.66 kB 318.50 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +4.53% 2,019.79 kB 2,111.33 kB +5.24% 302.68 kB 318.53 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +4.55% 2,015.02 kB 2,106.71 kB +5.25% 301.70 kB 317.54 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +4.55% 2,015.02 kB 2,106.71 kB +5.25% 301.70 kB 317.54 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +4.55% 2,015.20 kB 2,106.89 kB +5.25% 301.72 kB 317.57 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +4.53% 2,019.61 kB 2,111.16 kB +5.24% 302.66 kB 318.50 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +4.53% 2,019.61 kB 2,111.16 kB +5.24% 302.66 kB 318.50 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +4.53% 2,019.79 kB 2,111.33 kB +5.24% 302.68 kB 318.53 kB

Generated by 🚫 dangerJS against c6d62a4

return false;

case 'FunctionDeclaration':
case 'ComponentDeclaration':
Copy link
Member

Choose a reason for hiding this comment

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

Since the changes to this package are trivial, what do you think about patching it instead? It wouldn't conflict that often and if it did it would be easy to fix.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is the patched version, not sure I follow.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

it's in node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js etc

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll leave that as a followup for someone who wants to figure this out. Not sure adding more hacks on top of the already complicated build infra is actually better than a few forked files.

Copy link
Contributor
@mofeiZ mofeiZ left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

@kassens kassens merged commit 4c4a57c into facebook:main May 2, 2025
240 of 265 checks passed
@kassens kassens deleted the pr33089 branch May 2, 2025 19:04
github-actions bot pushed a commit that referenced this pull request May 2, 2025
Adds support for Flow's component and hook syntax.
[docs](https://flow.org/en/docs/react/component-syntax/)

DiffTrain build for [4c4a57c](4c4a57c)
jorge-cab pushed a commit that referenced this pull request May 2, 2025
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.

5 participants
0