Skip to content

Conversation

poteto
Copy link
Member

@poteto poteto commented Oct 1, 2025

Follow up to #34649. This adds the compiler rules back so they can be opted-in 6.1.0, but aren't included in the presets as that would be a breaking change.

Follow up to #34649. This adds the compiler rules back so they can be opted-in 6.1.0, but aren't included in the presets as that would be a breaking change.
@meta-cla meta-cla bot added the CLA Signed label Oct 1, 2025
@github-actions github-actions bot added the React Core Team Opened by a member of the React Core Team label Oct 1, 2025
@poteto poteto requested review from eps1lon and rickhanlonii October 1, 2025 20:59
@react-sizebot
Copy link

Comparing: 8618113...17c19db

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.73 kB 663.73 kB = 117.03 kB 117.03 kB
facebook-www/ReactDOM-prod.classic.js = 687.71 kB 687.71 kB = 121.08 kB 121.08 kB
facebook-www/ReactDOM-prod.modern.js = 678.14 kB 678.14 kB = 119.44 kB 119.44 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +1,089.29% 178.19 kB 2,119.24 kB +903.11% 30.36 kB 304.53 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +1,089.29% 178.19 kB 2,119.24 kB +903.11% 30.36 kB 304.53 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +1,089.29% 178.19 kB 2,119.24 kB +903.11% 30.36 kB 304.53 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +1,086.42% 178.25 kB 2,114.77 kB +901.60% 30.30 kB 303.52 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +1,086.42% 178.25 kB 2,114.77 kB +901.60% 30.30 kB 303.52 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +1,086.42% 178.25 kB 2,114.77 kB +901.60% 30.30 kB 303.52 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +1,089.29% 178.19 kB 2,119.24 kB +903.11% 30.36 kB 304.53 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +1,089.29% 178.19 kB 2,119.24 kB +903.11% 30.36 kB 304.53 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.development.js +1,089.29% 178.19 kB 2,119.24 kB +903.11% 30.36 kB 304.53 kB
oss-experimental/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +1,086.42% 178.25 kB 2,114.77 kB +901.60% 30.30 kB 303.52 kB
oss-stable-semver/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +1,086.42% 178.25 kB 2,114.77 kB +901.60% 30.30 kB 303.52 kB
oss-stable/eslint-plugin-react-hooks/cjs/eslint-plugin-react-hooks.production.js +1,086.42% 178.25 kB 2,114.77 kB +901.60% 30.30 kB 303.52 kB

Generated by 🚫 dangerJS against 17c19db

@poteto poteto merged commit ae74234 into main Oct 1, 2025
423 of 424 checks passed
@poteto poteto deleted the pr34672 branch October 1, 2025 21:05
github-actions bot pushed a commit that referenced this pull request Oct 1, 2025
)

Follow up to #34649. This adds the compiler rules back so they can be
opted-in 6.1.0, but aren't included in the presets as that would be a
breaking change.

DiffTrain build for [ae74234](ae74234)
github-actions bot pushed a commit that referenced this pull request Oct 1, 2025
)

Follow up to #34649. This adds the compiler rules back so they can be
opted-in 6.1.0, but aren't included in the presets as that would be a
breaking change.

DiffTrain build for [ae74234](ae74234)
@cpojer
Copy link
Contributor

cpojer commented Oct 2, 2025

Right now you have to manually enable each rule individually, which means as a user you have to be aware of new rules that get added otherwise you'll miss them, like this: https://github.com/nkzw-tech/eslint-config/blob/main/index.js#L84-L100

Could you add a preset that enables all the React compiler rules? For example, many ESLint plugins ship a "strict" preset, or alternatively you could have recommended-compiler preset or similar.

@poteto
Copy link
Member Author

poteto commented Oct 2, 2025

@cpojer yup, this will go out in the next release since it's a breaking change: #34675

@cpojer
Copy link
Contributor

cpojer commented Oct 2, 2025

Since we are here, is the react-hooks/preserve-manual-memoization new, or much stricter than before, or broken? I suddenly get tons of errors across multiple projects for trivial code such as this:

const jobs = useMemo(
    () => data.jobs?.edges?.filter(filterNodes),
    [data.jobs?.edges],
  );

where data comes from a Relay useFragment hook.

The previous singular react-compiler rule was not firing for similar useMemo calls. In other words, should upgrading from the 6.1.0-canary line to 6.1.0 yield errors like the above?

@josephsavona
Copy link
Member

@cpojer can you file an issue to discuss?

@cpojer
Copy link
Contributor

cpojer commented Oct 2, 2025

@josephsavona here you go: #34680

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