next.js icon indicating copy to clipboard operation
next.js copied to clipboard

[next 14] Enforce eslint-plugin-react-hooks v4

Open lorand-horvath opened this issue 1 year ago • 6 comments

@eps1lon @feedthejim Please see the reason for this in https://github.com/vercel/next.js/pull/71291

lorand-horvath avatar Oct 15 '24 10:10 lorand-horvath

Allow CI Workflow Run

  • [ ] approve CI run for commit: 7f957bf2ef42b48725055aa7c90c358c65c36565

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

ijjk avatar Oct 15 '24 10:10 ijjk

Allow CI Workflow Run

  • [ ] approve CI run for commit: 7f957bf2ef42b48725055aa7c90c358c65c36565

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

ijjk avatar Oct 15 '24 10:10 ijjk

@eps1lon If left unfixed, new next 14 apps will actually install a very old canary eslint-plugin-react-hooks@5 from July 2023 as I mentioned before, instead of 4.6.2. And that's a regression, if you ask me.

Anyway, I won't spend more time on this. I already have an override in place, which works fine, as I already said at the very beginning here https://github.com/vercel/next.js/pull/71218#issuecomment-2413171398

Note to self: do not spend time on OSS - not worth it.

lorand-horvath avatar Oct 15 '24 10:10 lorand-horvath

new next 14 apps will actually install a very old canary eslint-plugin-react-hooks@5 from July 2023 as I mentioned before, instead of 4.6.2. And that's a regression, if you ask me.

I agree. However, the change has been out there since 14.0 was released (actually since 13.4.9). So practically we can't revert that change at this point without risking breakage. Backporting is a taxing and risk operation so it's restricted to critical fixes. A dev-only issue that has a workaround does not fall into that category.

eps1lon avatar Oct 15 '24 10:10 eps1lon

new next 14 apps will actually install a very old canary eslint-plugin-react-hooks@5 from July 2023 as I mentioned before, instead of 4.6.2. And that's a regression, if you ask me.

I agree. However, the change has been out there since 14.0 was released (actually since 13.4.9). So practically we can't revert that change at this point without risking breakage. Backporting is a taxing and risk operation so it's restricted to critical fixes. A dev-only issue that has a workaround does not fall into that category.

Funny. Setting 4.6.2 is not a backport. And using canary react in next.js isn't risky? C'mon...

lorand-horvath avatar Oct 15 '24 11:10 lorand-horvath

Can this be merged please? eslint-plugin-react-hooks will still install the very old 5.0.0-canary-7118f5dd7-20230705 from July 2023 instead of the latest 4.6.2 from April 2024 as per https://github.com/vercel/next.js/blob/14-2-1/packages/eslint-config-next/package.json#L22

There's still no good explanation as to why has the plugin been pinned to a specific 5.0.0-canary, which is very old, older than 4.6.2. It should really be updated to install the latest from v4 branch, i.e. ^4.6.2.

lorand-horvath avatar Jan 22 '25 08:01 lorand-horvath