chore: update maintenance dependencies#308
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough本次变更迁移 ESLint 至 Flat Config,升级 React 19 及相关依赖,补充全局类型声明,调整 TypeScript 模块解析与包含项,并同步更新 Dependabot、README 和安装文档。 Changes工具链升级与类型兼容
Estimated code review effort: 3 (Moderate) | ~25 minutes Suggested reviewers: 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.
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
✅ 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. |
There was a problem hiding this comment.
Pull request overview
This PR modernizes the repo’s maintenance/tooling setup (React/TS/ESLint/Jest ecosystem upgrades), updates documentation branding links, and adjusts automation for dependency updates.
Changes:
- Upgrades core dev tooling/dependencies (ESLint 9 + flat config, Jest 30, React 19, TypeScript 6, Testing Library, etc.).
- Switches ESLint configuration from legacy
.eslintrc.js/.eslintignoretoeslint.config.mjs(flat config) and adds global TS ambient declarations. - Updates README branding (Ant Design logo link) and Dependabot configuration (grouped updates).
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Updates TS module/moduleResolution settings and reorganizes include/paths. |
| package.json | Bumps toolchain/runtime dev dependencies to newer major versions. |
| eslint.config.mjs | Introduces ESLint flat config to support ESLint 9 + TS ESLint 8. |
| global.d.ts | Adds ambient type references and module declarations for TS compatibility. |
| .eslintrc.js | Removes legacy ESLint config in favor of flat config. |
| .eslintignore | Removes legacy ignore file (replaced by flat-config ignores). |
| .github/dependabot.yml | Adds grouped update rules for npm and GitHub Actions. |
| README.md | Links Ant Design ecosystem logo to https://ant.design. |
| README.zh-CN.md | Links Ant Design ecosystem logo to https://ant.design. |
| docs/index.md | Removes pnpm install snippet from docs. |
| tests/snapshots/index.test.tsx.snap | Updates Jest snapshot header URL (Jest version bump). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Summary
Test Plan
Summary by CodeRabbit