chore: update maintenance dependencies#308
Conversation
|
Warning Review limit reached
Next review available in: 22 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
Walkthrough本次变更迁移 ESLint 至 Flat Config 格式(新增 eslint.config.mjs,兼容旧 .eslintrc.js 规则),升级 React 19 及测试/类型相关依赖,新增 global.d.ts 全局类型声明,放宽 tsconfig 严格性并调整模块解析策略,更新 Dependabot 分组配置及 README 徽标展示。 Changes工具链升级与类型兼容
Estimated code review effort: 2 (Simple) | ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
There was a problem hiding this comment.
Code Review
This pull request upgrades the project's dependencies to support React 19, ESLint 9, and TypeScript 6, introducing a flat ESLint configuration and global type definitions. However, several feedback points address a significant reduction in type safety: disabling strict mode and other strict flags in tsconfig.json should be avoided, and declaring Jest globals as any in global.d.ts overrides proper type definitions. Additionally, the ESLint migration logic in eslint.config.mjs should be revised to avoid silently discarding custom TypeScript rules.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
✅ Preview is ready!
↩️ Previous: ⚡️ 🤖 Powered by surge-preview |
|||||||||||||||
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@global.d.ts`:
- Around line 32-47: Remove the global vi declaration from global.d.ts and keep
the test typings aligned with Jest only. The issue is that vi is declared
without any Vitest runtime in this repo, so it creates a false API contract;
delete the vi global block and ensure any test helpers or typings continue to
reference jest, not vi, so only existing Jest symbols remain available.
- Around line 49-56: Remove the manual Jest any declarations from global.d.ts
because they override the real typings already provided by /// <reference
types="jest" />. Delete the global declares for describe, it, test, beforeEach,
afterEach, beforeAll, afterAll, and expect so the test symbols regain proper
type checking and IntelliSense.
In `@react-compat.d.ts`:
- Line 5: The zero-argument useRef overload in react-compat.d.ts should not be
restored because it weakens React 19 type checking and hides incompatible calls.
Remove the useRef<T = undefined>() declaration from the compatibility typings,
and keep the remaining React.MutableRefObject signatures intact; there are no
call sites that require this overload.
In `@tsconfig.json`:
- Around line 6-22: This tsconfig change disables strict mode and multiple
strict* checks for the entire repository, which globally weakens type safety.
Revert the broad compiler relaxations in tsconfig.json and keep the project in
strict mode; then fix only the specific type errors that remain, or move
compatibility declarations like react-compat.d.ts and global.d.ts into a
separate tsconfig so they don’t force the whole repo to compile in non-strict
mode.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 173868ee-eccb-4894-b278-45fb3ee9e9d3
📒 Files selected for processing (9)
.eslintignore.github/dependabot.ymlREADME.mdREADME.zh-CN.mdeslint.config.mjsglobal.d.tspackage.jsonreact-compat.d.tstsconfig.json
💤 Files with no reviewable changes (1)
- .eslintignore
|
React Doctor skipped this pull request — it changed no React files. Reviewed by React Doctor for commit |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #308 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 1 1
Lines 30 30
Branches 5 5
=========================================
Hits 30 30 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
eslint.config.mjs (1)
35-38: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win为
noopRule覆盖consistent-type-exports补充说明注释。用一个空实现的
noopRule顶替@typescript-eslint/consistent-type-exports而不是简单地把该规则的严重级别设为off,这是一种不常见的手段(可能是为了避免该规则在当前 parserOptions/项目配置下运行报错或崩溃)。建议加一行注释说明具体动机,便于后续维护者理解,而不必逆向猜测。📝 示例注释
+// `consistent-type-exports` 在当前 flat config / 解析器设置下会报错(或行为不符合预期), +// 因此用空实现替换其规则逻辑,而非仅设置 severity,以确保所有引用该插件对象的配置条目都失效该规则。 const noopRule = { meta: { type: 'problem', docs: {}, schema: [] }, create: () => ({}), };Also applies to: 80-89
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@eslint.config.mjs` around lines 35 - 38, The noopRule override for `@typescript-eslint/consistent-type-exports` is an unusual workaround, so add a brief comment near the noopRule definition and its use in eslint.config.mjs explaining why it replaces the rule instead of disabling it. Keep the note tied to the noopRule symbol and the consistent-type-exports override so future maintainers understand the parser/config issue without having to infer it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@eslint.config.mjs`:
- Around line 35-38: The noopRule override for
`@typescript-eslint/consistent-type-exports` is an unusual workaround, so add a
brief comment near the noopRule definition and its use in eslint.config.mjs
explaining why it replaces the rule instead of disabling it. Keep the note tied
to the noopRule symbol and the consistent-type-exports override so future
maintainers understand the parser/config issue without having to infer it.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 34baf9e9-178e-488f-b9f4-c22efd457827
📒 Files selected for processing (3)
eslint.config.mjsglobal.d.tstsconfig.json
💤 Files with no reviewable changes (1)
- global.d.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- tsconfig.json
|
Related to ant-design/ant-design#58514. |

Summary
Test Plan
Summary by CodeRabbit