chore(eslint): Upgrade ESLint to v10 and bump plugins - #41509
Conversation
Upgrade eslint 9.39.5 -> 10.7.0 across the root and @rocket.chat/eslint-config, and bump plugins to their latest compatible releases (typescript-eslint 8.64.0, eslint-plugin-react-hooks 7.1.1, eslint-plugin-storybook 10.5.2, globals 17.7.0, @eslint/js 10.0.1, @babel/eslint-parser 7.29.7, @types/eslint 9.6.1). eslint-plugin-react 7.37.5 has no ESLint 10 release yet and calls context APIs removed in v10 (getFilename/getSourceCode). Patch the three unshimmed call sites with the fallback idiom the plugin already uses elsewhere, until upstream ships v10 support. jsx-a11y and @babel/eslint-parser run fine on v10 (advisory peer warnings only). ESLint 10's expanded eslint:recommended adds no-unassigned-vars, which flags a latent always-undefined placeholder in ProxiedApp.ts; make it explicit. yarn lint --force passes (71/71 workspaces, 0 errors). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Looks like this PR is ready to merge! 🎉 |
|
/jira ARCH-2200 |
🦋 Changeset detectedLatest commit: a636c07 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughUpgrades ESLint to v10 across the repository and shared ESLint configuration, updates related plugins, records a minor package release, and changes an application request-options declaration. ChangesESLint upgrade
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #41509 +/- ##
===========================================
- Coverage 68.69% 68.66% -0.04%
===========================================
Files 4134 4134
Lines 160417 160417
Branches 29312 29295 -17
===========================================
- Hits 110205 110154 -51
- Misses 45104 45161 +57
+ Partials 5108 5102 -6
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
Upgrades ESLint to the latest major (v10) and bumps the linting plugins to their newest compatible releases.
eslint9.39.5 → 10.7.0(root +@rocket.chat/eslint-config),@eslint/js → 10.0.1typescript-eslint 8.56.1 → 8.64.0,eslint-plugin-react-hooks 7.0.1 → 7.1.1,eslint-plugin-storybook 10.2.19 → 10.5.2,globals 17.3.0 → 17.7.0,@babel/eslint-parser 7.28.6 → 7.29.7,@types/eslint 8.44.9 → 9.6.1eslint-plugin-reactpatch.eslint-plugin-react@7.37.5has no ESLint 10 release yet and callscontext.getFilename()/context.getSourceCode(), which v10 removed (v9 kept them as deprecated). Its ownlib/util/eslint.jsalready shims the harder scope-related methods; only three direct call sites were unguarded (lib/util/version.js,lib/rules/jsx-filename-extension.js,lib/rules/forward-ref-uses-ref.js). Ayarn patchadds the samex.getFilename ? x.getFilename() : x.filenamefallback the plugin already uses elsewhere. To be removed once upstream ships v10 support.eslint-plugin-jsx-a11yand@babel/eslint-parserrun fine on v10 (advisory peer warnings only).Kept deliberately pinned (out of scope, large blast radius):
prettier(formatter engine — a bump risks repo-wide reformatting) and@babel/core/@babel/eslint-parser@8(Babel 8 is pinned across the monorepo).One code change. ESLint 10's expanded
eslint:recommendedaddsno-unassigned-vars, which flagged a latent always-undefinedplaceholder inpackages/apps/src/server/ProxiedApp.ts; made it an explicitconst options = undefined.Issue(s)
ARCH-2200
Steps to test or reproduce
yarn lint --force— passes across all workspaces (71/71, 0 errors) on ESLint 10.Further comments
No changeset: this is a dev-tooling/devDependency upgrade with no runtime or end-user-facing effect.
packageExtensionswere not used to widen the two plugins'eslintpeer ranges — yarn 4.12 flags such entries redundant (YN0069) and leaves the original range untouched (verified via A/B test), so the effective fix is the plugin patch. A single advisory peer warning remains (eslint 10 vs the^9peer of react/jsx-a11y/babel-parser), consistent with the repo's existing peer warnings.Task: ARCH-2289
Summary by CodeRabbit
Chores
Bug Fixes