Skip to content

Conversation

poteto
Copy link
Member

@poteto poteto commented Oct 3, 2025

We will be focusing eslint-plugin-react-hooks as the primary OSS-only package for our lint plugin. eslint-plugin-react-compiler will remain as a Meta only package as some limitations of our internal infra require us to use packages that aren't widely adopted by the rest of the industry.

This PR removes hermes-parser, which was meant to support parsing Flow syntax.

We will be focusing eslint-plugin-react-hooks as the primary OSS-only package for our lint plugin. eslint-plugin-react-compiler will remain as a Meta only package as some limitations of our internal infra require us to use packages that aren't widely adopted by the rest of the industry.

This PR removes `hermes-parser`, which was meant to support parsing Flow syntax.
@meta-cla meta-cla bot added the CLA Signed label Oct 3, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Oct 3, 2025
@react-sizebot
Copy link

Comparing: 85c427d...4de48af

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 = 536.14 kB 536.14 kB = 94.81 kB 94.81 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 = 663.96 kB 663.96 kB = 117.04 kB 117.04 kB
facebook-www/ReactDOM-prod.classic.js = 687.83 kB 687.83 kB = 121.08 kB 121.08 kB
facebook-www/ReactDOM-prod.modern.js = 678.26 kB 678.26 kB = 119.44 kB 119.43 kB

Significant size changes

Includes any change greater than 0.2%:

(No significant changes)

Generated by 🚫 dangerJS against 4de48af

@poteto poteto merged commit 71753ac into main Oct 3, 2025
247 checks passed
@poteto poteto deleted the pr34719 branch October 3, 2025 16:58
github-actions bot pushed a commit that referenced this pull request Oct 3, 2025
We will be focusing eslint-plugin-react-hooks as the primary OSS-only
package for our lint plugin. eslint-plugin-react-compiler will remain as
a Meta only package as some limitations of our internal infra require us
to use packages that aren't widely adopted by the rest of the industry.

This PR removes `hermes-parser`, which was meant to support parsing Flow
syntax.

DiffTrain build for [71753ac](71753ac)
github-actions bot pushed a commit that referenced this pull request Oct 3, 2025
We will be focusing eslint-plugin-react-hooks as the primary OSS-only
package for our lint plugin. eslint-plugin-react-compiler will remain as
a Meta only package as some limitations of our internal infra require us
to use packages that aren't widely adopted by the rest of the industry.

This PR removes `hermes-parser`, which was meant to support parsing Flow
syntax.

DiffTrain build for [71753ac](71753ac)
@mwiencek
Copy link
Contributor

mwiencek commented Oct 4, 2025

Hi, just to be sure, does this change have any ramifications for projects using Flow?

poteto added a commit that referenced this pull request Oct 6, 2025
Adds back HermesParser to eslint-plugin-react-hooks. There are still [external users of Flow](#34719 (comment)) using the plugin, so we shouldn't break the plugin for them. However, we still have the problem of double parsing: once from eslint (which we discard) and then another via babel/hermes parser.

In the long run we should investigate a translation layer from estree to babel (or alternatively, update the compiler to take estree as input). For now I am reverting that PR.  This does mean that [Sandpack in react.dev](https://github.com/reactjs/react.dev/blob/11cb6b591571caf5fa2a192117b6a6445c3f2027/src/components/MDX/Sandpack/runESLint.tsx#L31) cannot update to the latest eprh as HermesParser does not appear to be able to be run in a browser. I discovered this while trying to update eprh on react.dev last week, but didn't investigate deeply. I'll need to double check that again to find out more.
@poteto
Copy link
Member Author

poteto commented Oct 6, 2025

@mwiencek yeah, the compiler rules won't work on Flow anymore after this PR. I hadn't realized there were still Flow users outside of Meta remaining, hence the PR. But I've opened #34747 to revert the change for now while we figure out a long term plan.

poteto added a commit that referenced this pull request Oct 6, 2025
Adds back HermesParser to eslint-plugin-react-hooks. There are still
[external users of
Flow](#34719 (comment))
using the plugin, so we shouldn't break the plugin for them. However, we
still have the problem of double parsing: once from eslint (which we
discard) and then another via babel/hermes parser.

In the long run we should investigate a translation layer from estree to
babel (or alternatively, update the compiler to take estree as input).
But for now, I am reverting the PR.

This does mean that [Sandpack in
react.dev](https://github.com/reactjs/react.dev/blob/11cb6b591571caf5fa2a192117b6a6445c3f2027/src/components/MDX/Sandpack/runESLint.tsx#L31)
cannot update to the latest eprh as HermesParser does not appear to be
able to be run in a browser. I discovered this while trying to update
eprh on react.dev last week, but didn't investigate deeply. I'll need to
double check that again to find out more.
github-actions bot pushed a commit that referenced this pull request Oct 6, 2025
Adds back HermesParser to eslint-plugin-react-hooks. There are still
[external users of
Flow](#34719 (comment))
using the plugin, so we shouldn't break the plugin for them. However, we
still have the problem of double parsing: once from eslint (which we
discard) and then another via babel/hermes parser.

In the long run we should investigate a translation layer from estree to
babel (or alternatively, update the compiler to take estree as input).
But for now, I am reverting the PR.

This does mean that [Sandpack in
react.dev](https://github.com/reactjs/react.dev/blob/11cb6b591571caf5fa2a192117b6a6445c3f2027/src/components/MDX/Sandpack/runESLint.tsx#L31)
cannot update to the latest eprh as HermesParser does not appear to be
able to be run in a browser. I discovered this while trying to update
eprh on react.dev last week, but didn't investigate deeply. I'll need to
double check that again to find out more.

DiffTrain build for [b65e6fc](b65e6fc)
github-actions bot pushed a commit that referenced this pull request Oct 6, 2025
Adds back HermesParser to eslint-plugin-react-hooks. There are still
[external users of
Flow](#34719 (comment))
using the plugin, so we shouldn't break the plugin for them. However, we
still have the problem of double parsing: once from eslint (which we
discard) and then another via babel/hermes parser.

In the long run we should investigate a translation layer from estree to
babel (or alternatively, update the compiler to take estree as input).
But for now, I am reverting the PR.

This does mean that [Sandpack in
react.dev](https://github.com/reactjs/react.dev/blob/11cb6b591571caf5fa2a192117b6a6445c3f2027/src/components/MDX/Sandpack/runESLint.tsx#L31)
cannot update to the latest eprh as HermesParser does not appear to be
able to be run in a browser. I discovered this while trying to update
eprh on react.dev last week, but didn't investigate deeply. I'll need to
double check that again to find out more.

DiffTrain build for [b65e6fc](b65e6fc)
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