Skip to content

chore(linting): update ESLint to v10, bump lint group deps#8672

Open
avivkeller wants to merge 1 commit intomainfrom
chore-eslint-reduce-deps
Open

chore(linting): update ESLint to v10, bump lint group deps#8672
avivkeller wants to merge 1 commit intomainfrom
chore-eslint-reduce-deps

Conversation

@avivkeller
Copy link
Member

@avivkeller avivkeller commented Feb 28, 2026

This PR updates ESLint to v10, and replaces eslint-plugin-react with @eslint-react/eslint-plugin for the following reasons:

  • eslint-plugin-react does not support ESLint v10
  • @eslint-react/eslint-plugin is much smaller and much faster (in CI, it's 2m43s vs 3m12s

@avivkeller avivkeller requested review from a team as code owners February 28, 2026 16:58
@vercel
Copy link

vercel bot commented Feb 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
nodejs-org Ready Ready Preview Mar 21, 2026 0:17am

Request Review

@github-actions
Copy link
Contributor

👋 Codeowner Review Request

The following codeowners have been identified for the changed files:

Team reviewers: @nodejs/nodejs-website

Please review the changes when you have a chance. Thank you! 🙏

@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

❌ Patch coverage is 77.77778% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.09%. Comparing base (801e49a) to head (0dfeac1).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/site/providers/releaseProvider.tsx 37.50% 5 Missing ⚠️
apps/site/providers/matterProvider.tsx 0.00% 3 Missing ⚠️
apps/site/providers/navigationStateProvider.tsx 0.00% 3 Missing ⚠️
...components/src/Common/AvatarGroup/Avatar/index.tsx 97.22% 1 Missing ⚠️
.../ui-components/src/Common/BasePagination/index.tsx 50.00% 1 Missing ⚠️
packages/ui-components/src/Common/Select/index.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8672      +/-   ##
==========================================
- Coverage   75.10%   75.09%   -0.02%     
==========================================
  Files         104      103       -1     
  Lines        9167     9141      -26     
  Branches      315      316       +1     
==========================================
- Hits         6885     6864      -21     
+ Misses       2280     2275       -5     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@MattIPv4 MattIPv4 left a comment

Choose a reason for hiding this comment

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

Not sure I'm overly a fan of this at first glance, it seems like we're losing linting on things like making sure hook calls have the correct dependencies?

Is there reason not to just wait until the existing React plugins are updating for eslint v10?

@github-actions
Copy link
Contributor

github-actions bot commented Feb 28, 2026

📦 Build Size Comparison

Summary

Metric Value
Old Total Size 3.52 MB
New Total Size 3.52 MB
Delta -674.00 B (-0.02%)

Changes

➕ Added Assets (29)
Name Size
.next/static/chunks/e4d508f16eee7dae.js 22.32 KB
.next/static/chunks/7d80b9953fcb62e2.js 40.61 KB
.next/static/chunks/6a51c9708a0e3981.js 108.87 KB
.next/static/chunks/398a835afce89113.js 219.26 KB
.next/static/chunks/1298949ba4da25a1.js 283.00 B
.next/static/chunks/2bac579f40a08377.js 30.06 KB
.next/static/chunks/dc2bb43980d37b47.js 10.82 KB
.next/static/chunks/46deeb46308b8a8b.js 41.54 KB
.next/static/chunks/279e62775d13adf0.js 24.94 KB
.next/static/chunks/1fdf0c90043d421b.js 53.00 KB
.next/static/chunks/647adc4d866eb2a0.js 28.31 KB
.next/static/chunks/bf7e8c827e6573c7.js 61.92 KB
.next/static/chunks/cf5bd37ba883f8b4.js 208.90 KB
.next/static/chunks/c8ebc4dcd7dac6c8.js 330.82 KB
.next/static/chunks/fb1146ef88eadcbd.js 136.32 KB
.next/static/chunks/6280561393bfee24.js 3.33 KB
.next/static/chunks/bf124f487000d6b9.js 53.00 KB
.next/static/chunks/8abe9fe7f0ec9ca6.js 61.92 KB
.next/static/chunks/37b31935536e8544.js 330.82 KB
.next/static/chunks/a6df9012f6831e3a.js 27.53 KB
.next/static/chunks/8270b8a9e582491b.js 28.31 KB
.next/static/chunks/31572fb7e52404d1.js 21.36 KB
.next/static/chunks/629d1346574f1489.js 61.92 KB
.next/static/chunks/59232a217bc83f40.js 330.82 KB
.next/static/chunks/164913355d0acb66.js 53.00 KB
.next/static/chunks/a2bacc7d30420612.js 561.78 KB
.next/static/chunks/b6c25ed161a622c8.js 53.00 KB
.next/static/chunks/4384b6854bb936e5.js 61.92 KB
.next/static/chunks/77d6070b11129505.js 561.78 KB
➖ Removed Assets (29)
Name Size
.next/static/chunks/599333a8cf3053de.js 22.32 KB
.next/static/chunks/6a7c36157317286d.js 40.61 KB
.next/static/chunks/bba3243d31bfa8a4.js 108.88 KB
.next/static/chunks/662908d0e5f0e3d0.js 219.26 KB
.next/static/chunks/3eff9e09422eb33b.js 283.00 B
.next/static/chunks/51e3ce1db19e7d54.js 30.06 KB
.next/static/chunks/6cd0a472cfe6bcc0.js 10.83 KB
.next/static/chunks/d1d9ac1ba03e2eb9.js 41.54 KB
.next/static/chunks/ba15552223c1ea49.js 24.94 KB
.next/static/chunks/5b820f9c4c128786.js 53.01 KB
.next/static/chunks/ea8bc2e134c22d1b.js 28.31 KB
.next/static/chunks/31392637c14d0c89.js 61.92 KB
.next/static/chunks/92c4df6e37e130bc.js 208.90 KB
.next/static/chunks/82f63748e0f2d067.js 330.89 KB
.next/static/chunks/078fcc75813948ff.js 136.32 KB
.next/static/chunks/f82a1f4efed63601.js 3.33 KB
.next/static/chunks/ecfe33e155b95b30.js 53.01 KB
.next/static/chunks/8573ccda2dfb7747.js 61.92 KB
.next/static/chunks/30c10e266ece02f9.js 330.89 KB
.next/static/chunks/1d40d0accf5c015e.js 9.94 KB
.next/static/chunks/e7d53465abce4406.js 28.31 KB
.next/static/chunks/5d023df2643c19d5.js 36.52 KB
.next/static/chunks/5c3eaa82d0fdcb42.js 61.92 KB
.next/static/chunks/edcd4c05efe2448b.js 330.89 KB
.next/static/chunks/20a93e0a3a29d5d8.js 563.18 KB
.next/static/chunks/b8e1e413f3409389.js 53.01 KB
.next/static/chunks/33dc7f9477faf9df.js 61.92 KB
.next/static/chunks/fafd890388b91034.js 53.01 KB
.next/static/chunks/b54e70b9076a139f.js 563.18 KB

@avivkeller avivkeller marked this pull request as draft February 28, 2026 17:15
@avivkeller
Copy link
Member Author

Not sure I'm overly a fan of this at first glance, it seems like we're losing linting on things like making sure hook calls have the correct dependencies?

That's coming soon.

Is there reason not to just wait until the existing React plugins are updating for eslint v10?

I don't think they are planning on doing that anytime soon.


Let's draft this until either one of the following:

  1. This plugin releases v3
  2. @ljharb's plugin supports v10

Whichever happens happens, how does that sound?

@MattIPv4
Copy link
Member

👍 Sounds reasonable

@avivkeller
Copy link
Member Author

3.0.0 is out, and the previous plugin still has not updated support for v10. I'll rebase this PR today

@avivkeller avivkeller changed the title chore(eslint): update to v10 chore(linting): update ESLint to v10, bump lint group deps Mar 20, 2026
@avivkeller avivkeller marked this pull request as ready for review March 21, 2026 00:10
Copilot AI review requested due to automatic review settings March 21, 2026 00:10
@avivkeller avivkeller force-pushed the chore-eslint-reduce-deps branch from 8195469 to e4f2adf Compare March 21, 2026 00:11
@avivkeller
Copy link
Member Author

avivkeller commented Mar 21, 2026

Just need to fix the egregious lockfile diff...

Copy link
Contributor

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 repo’s linting toolchain to ESLint v10 and migrates React linting from eslint-plugin-react/eslint-plugin-react-hooks to @eslint-react/eslint-plugin, along with a set of codebase adjustments to satisfy the new rules (notably around React context usage, hook organization, and a few component refactors).

Changes:

  • Bump ESLint (and related lint-group dependencies) and update flat ESLint configs to use @eslint-react/eslint-plugin.
  • Refactor React context usage across apps/site (switch to use(Context) and React 19 provider shorthand) and reorganize hooks into apps/site/hooks/*.
  • Minor component cleanups (pagination helper rename, key updates, lint-suppression comment updates).

Reviewed changes

Copilot reviewed 48 out of 52 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/ui-components/src/Icons/InstallationMethod/N.tsx Removes an inline comment in the SVG icon.
packages/ui-components/src/Containers/Sidebar/index.tsx Refactors Sidebar away from forwardRef and changes how ref is handled/typed.
packages/ui-components/src/Common/Select/index.tsx Removes useEffect that synced internal state with defaultValue; updates eslint-disable rule name.
packages/ui-components/src/Common/Search/Suggestions/index.tsx Reorders props spread vs key on list items.
packages/ui-components/src/Common/BasePagination/index.tsx Switches pagination elements helper from a hook-like name to a plain function import.
packages/ui-components/src/Common/BasePagination/getPageElements.tsx Renames useGetPageElements to getPageElements.
packages/ui-components/src/Common/AvatarGroup/Avatar/index.tsx Refactors Avatar away from forwardRef.
packages/ui-components/package.json Bumps linting/styling-related dev deps for ui-components.
packages/ui-components/eslint.config.js Migrates React linting config to @eslint-react/eslint-plugin and adjusts rules.
package.json Bumps root lint-related dependencies (ESLint v10, lint-staged, etc.).
apps/site/types/server.ts Updates type import path for useDetectOS.
apps/site/providers/releaseProvider.tsx Switches to React 19 use(Context) and provider shorthand; updates eslint-disable rule names.
apps/site/providers/navigationStateProvider.tsx Uses provider shorthand and renames internal ref var.
apps/site/providers/matterProvider.tsx Updates useDetectOS import path and uses provider shorthand.
apps/site/package.json Bumps lint-related deps for the site app and adds @eslint-react/eslint-plugin.
apps/site/layouts/Post.tsx Switches from useClientContext (server hook) to getClientContext.
apps/site/hooks/useSiteNavigation.ts Adds/moves site navigation hook into top-level hooks/.
apps/site/hooks/useScrollToElement.ts Switches to use(Context), updates eslint-disable rule names, and uses new useScroll.
apps/site/hooks/useScroll.ts Adds a debounced scroll event hook.
apps/site/hooks/useMediaQuery.ts Adds a matchMedia hook.
apps/site/hooks/useDetectOS.ts Adds eslint-disable for set-state-in-effect rule.
apps/site/hooks/useClientContext.ts Switches from useContext to use(Context).
apps/site/hooks/server/useScrollToElement.ts Removes RSC-guard stub.
apps/site/hooks/server/useScroll.ts Removes RSC-guard stub.
apps/site/hooks/server/useClientContext.ts Removes server hook wrapper around getClientContext.
apps/site/hooks/server/index.ts Removes server hooks barrel export.
apps/site/hooks/generic/index.ts Removes generic hooks barrel export.
apps/site/hooks/client/index.ts Removes client hooks barrel export.
apps/site/hooks/tests/useScrollToElement.test.jsx Updates imports/formatting for relocated hook.
apps/site/hooks/tests/useMediaQuery.test.mjs Updates import for relocated hook.
apps/site/hooks/tests/useDetectOS.test.mjs Updates import for relocated hook.
apps/site/hooks/tests/useClientContext.test.jsx Updates import for relocated hook.
apps/site/eslint.config.js Migrates React linting config to @eslint-react/eslint-plugin and adjusts rules.
apps/site/components/withSidebarCrossLinks.tsx Updates hooks imports and switches to getClientContext.
apps/site/components/withSidebar.tsx Updates hooks imports to new hook locations.
apps/site/components/withNavBar.tsx Updates useSiteNavigation import path.
apps/site/components/withMetaBar.tsx Updates hooks imports and adds purity suppression for deterministic date formatting.
apps/site/components/withBreadcrumbs.tsx Updates hooks imports to new hook locations.
apps/site/components/EOL/EOLModal.tsx Updates eslint-disable rule names and adds a new suppression for useMemo.
apps/site/components/Downloads/Release/VersionDropdown.tsx Switches from useContext to use(Context).
apps/site/components/Downloads/Release/ReleaseCodeBox.tsx Switches to use(Context) and adds eslint-disable for dangerouslySetInnerHTML.
apps/site/components/Downloads/Release/PrebuiltDownloadButtons.tsx Switches from useContext to use(Context).
apps/site/components/Downloads/Release/PlatformDropdown.tsx Switches to use(Context) and updates hook import paths / eslint-disable rule names.
apps/site/components/Downloads/Release/PackageManagerDropdown.tsx Switches to use(Context) and updates eslint-disable rule names.
apps/site/components/Downloads/Release/OperatingSystemDropdown.tsx Switches to use(Context) and updates hook import paths / eslint-disable rule names.
apps/site/components/Downloads/Release/InstallationMethodDropdown.tsx Switches to use(Context) and updates eslint-disable rule names.
apps/site/components/Downloads/Release/DownloadLink.tsx Switches from useContext to use(Context).
apps/site/components/Downloads/Release/ChangelogLink.tsx Switches from useContext to use(Context).
apps/site/components/Downloads/Release/BlogPostLink.tsx Switches from useContext to use(Context).
apps/site/components/Common/Supporters/index.tsx Changes React list key from ${name}-${i} to name.
apps/site/components/Common/FormattedTime.tsx Adds purity suppression for deterministic date construction.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@avivkeller avivkeller requested a review from MattIPv4 March 21, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants