Skip to content

chore: update maintenance dependencies#709

Merged
afc163 merged 17 commits into
masterfrom
codex/update-maintenance-deps
Jul 3, 2026
Merged

chore: update maintenance dependencies#709
afc163 merged 17 commits into
masterfrom
codex/update-maintenance-deps

Conversation

@afc163

@afc163 afc163 commented Jun 29, 2026

Copy link
Copy Markdown
Member

Summary

  • Link the Ant Design ecosystem logo in README files to https://ant.design
  • Update React, React DOM, TypeScript, ESLint, Testing Library, @types/, @typescript-eslint/, lint-staged, and related lint dependencies
  • Add ESLint flat config compatibility for ESLint 9 and TypeScript ESLint 8
  • Use grouped Dependabot updates for npm and GitHub Actions

Test Plan

  • npm run lint
  • npm run tsc

Summary by CodeRabbit

  • 新功能

    • 优化依赖更新管理,支持按生态分组聚合展示与发起更新。
    • 统一升级前端开发工具链,提升构建、测试和代码检查的兼容性。
  • 文档

    • 更新中英文 README 顶部品牌链接,点击可直接跳转到官网。
  • 测试与配置

    • 补充类型声明与测试环境支持,减少本地开发和测试中的类型报错。

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

本次变更升级了 ESLint(迁移至 Flat Config)、React、TypeScript 及测试相关依赖版本,调整了 tsconfig 编译选项,新增全局类型声明文件补充,为 Dependabot 更新配置新增分组规则,并更新了 README 顶部徽标为可点击链接。

Changes

工具链升级与类型基础设施

Layer / File(s) Summary
依赖版本升级与 Dependabot 分组
package.json, .github/dependabot.yml
升级测试库、React、TypeScript、ESLint 及相关插件依赖版本;为 npm 与 github-actions 更新条目新增分组规则。
ESLint Flat Config 迁移
eslint.config.mjs, .eslintrc.js
新增 Flat Config 入口、兼容层与规则归一化逻辑,导出包含忽略项和规则覆盖项的配置数组;旧配置显式声明 @typescript-eslint 插件。
TypeScript 编译配置调整
tsconfig.json
模块解析改为 bundler、模块改为 ESNext,关闭多项严格性选项,移除部分旧配置,并把 global.d.ts 加入 include
全局类型声明
global.d.ts
新增类型引用、模块声明、JSX 命名空间映射、jest 断言扩展方法及 vi 全局类型声明。
README 徽标链接更新
README.md, README.zh-CN.md
顶部 Ant Design 徽标由纯图片改为可点击链接,指向 https://ant.design

Estimated code review effort: 3 (Moderate) | ~25 minutes

Poem

兔子啃着新配置,蹦跳着升级又打包,
Flat Config 铺开新道路,类型声明层层饱,
依赖升级如春笋,README 链接闪闪耀,
一路蹦跶不停歇,代码干净又睡好觉 🐇✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题简洁且与本次维护性依赖和工具链更新的主要变更一致。
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/update-maintenance-deps

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@socket-security

socket-security Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​types/​jest@​29.5.14 ⏵ 30.0.01001007780100
Addednpm/​@​types/​react@​19.2.171001007995100
Addednpm/​@​eslint/​js@​9.39.410010010088100
Addednpm/​typescript@​6.0.3100100909690
Addednpm/​eslint@​9.39.49710010096100

View full report

@socket-security

socket-security Bot commented Jun 29, 2026

Copy link
Copy Markdown

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.

View full report

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request upgrades the project's dependencies to React 19, ESLint 9, and TypeScript 6, introducing several configuration files to support the transition. Feedback on these changes highlights several critical issues: multiple non-existent dependency versions are specified in package.json which will cause installation failures; strict type-checking has been disabled in tsconfig.json, reducing type safety; react and react-dom are fragilely monkey-patched to restore deprecated APIs; Jest globals are typed as any, overriding proper types; and a complex runtime normalization is used in ESLint config to bridge legacy configurations. It is recommended to use valid dependency versions, maintain strict TypeScript checks, adopt idiomatic React 19 APIs, leverage proper Jest types, and fully migrate to ESLint Flat Config.

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.

Comment thread package.json Outdated
Comment thread tsconfig.json Outdated
Comment thread react-compat.d.ts Outdated
Comment thread global.d.ts Outdated
Comment thread eslint.config.mjs Outdated
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

✅ Preview is ready!

PR preview ✅ Ready ✅ Ready
🔗 Preview https://react-component-pagination-preview-pr-709.surge.sh
📝 Commit1bcfb28
⏱️ Build time20.195s
📦 Size2.0 MB (+1.1 KB ⬆️) · 83 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ 1bcfb28 · react-component-pagination-preview-pr-709.surge.sh (open ↗) · 2026-07-03 03:37:03 UTC

🤖 Powered by surge-preview

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
pagination Ready Ready Preview, Comment Jul 3, 2026 3:36am

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 58-65: The Jest globals in the test type declarations are being
redefined as any, which overrides the existing typed globals from Jest/jest-dom.
Remove the manual declare const entries for describe, it, test, beforeEach,
afterEach, beforeAll, afterAll, and expect from global.d.ts so the project uses
the framework-provided typings directly and preserves correct matcher and
callback signatures.
🪄 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: 8e6e3a59-10a2-4fb3-a45a-acbc338a5ae8

📥 Commits

Reviewing files that changed from the base of the PR and between 828a20e and 3661cac.

📒 Files selected for processing (8)
  • .github/dependabot.yml
  • README.md
  • README.zh-CN.md
  • eslint.config.mjs
  • global.d.ts
  • package.json
  • react-compat.d.ts
  • tsconfig.json

Comment thread global.d.ts Outdated
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.69%. Comparing base (a029724) to head (1bcfb28).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #709   +/-   ##
=======================================
  Coverage   99.69%   99.69%           
=======================================
  Files           4        4           
  Lines         329      329           
  Branches      151      151           
=======================================
  Hits          328      328           
  Misses          1        1           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@tsconfig.json`:
- Around line 14-20: 仓库级的 TypeScript 严格检查被全局关闭了,导致 `npm run tsc`
和生成的声明类型都失去关键校验。请在 `tsconfig.json` 中移除对 `strict` 及其核心子项(如
`noImplicitAny`、`strictNullChecks`、`strictFunctionTypes`、`strictBindCallApply`、`strictPropertyInitialization`、`noImplicitThis`)的整体禁用,改为仅对确实不兼容的项做最小范围豁免,并保持
`declaration` 输出时的类型安全。
🪄 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: 98d9eb4c-2d38-47d6-8b73-c59b775b8b6f

📥 Commits

Reviewing files that changed from the base of the PR and between 3661cac and 710421f.

📒 Files selected for processing (4)
  • .eslintrc.js
  • eslint.config.mjs
  • global.d.ts
  • tsconfig.json
💤 Files with no reviewable changes (1)
  • global.d.ts

Comment thread tsconfig.json Outdated
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

React Doctor skipped this pull request — it changed no React files.

Reviewed by React Doctor for commit 1bcfb28.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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 `@eslint.config.mjs`:
- Around line 18-25: The current `recommendedTsRules` allowlist in
`eslint.config.mjs` only preserves TypeScript rules from
`tsEslintPlugin.configs.recommended`, so it drops local `@typescript-eslint`
overrides from `.eslintrc.js` such as disabled rules. Update the flat config
generation to also include the repo’s explicit `@typescript-eslint/*` overrides,
either by merging those overrides into the allowlist or by applying them after
`compat.config(...)`. Keep the fix centered around `recommendedTsRules`, the
`tsEslintPlugin.configs.recommended` extraction, and the final config assembly
so locally disabled rules are not lost.
🪄 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: c2466f51-21b4-4780-acc6-2e105e93352c

📥 Commits

Reviewing files that changed from the base of the PR and between 710421f and fd1c6bb.

📒 Files selected for processing (3)
  • eslint.config.mjs
  • package.json
  • react-compat.d.ts
💤 Files with no reviewable changes (1)
  • react-compat.d.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • package.json

Comment thread eslint.config.mjs Outdated
@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/afc163s-projects?upgradeToPro=build-rate-limit

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
eslint.config.mjs (1)

83-93: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

手动重建 @typescript-eslint plugin 是必要的,但建议为 noopRule 替换 consistent-type-exports 加注释。

经查证,ESLint Flat Config 在同一批命中文件的多个配置对象中重复声明同名 plugin(非同一引用)会抛出 Cannot redefine plugin 错误,因此这里只保留一份手工构造的 @typescript-eslint plugin、并让 normalizeConfig 剥离旧配置里自带的 plugin 声明,是规避该限制的合理做法。

不过用 noopRule 直接替换 consistent-type-exports 的规则实现(而不是在文件末尾像另外三条规则一样直接 'off')是一种不常见的手法,缺少注释说明动机,容易被后续维护者误认为多余代码而移除。建议补充一行注释说明原因(例如兼容性/已知问题),以避免误删。

📝 建议补充说明性注释
     plugins: {
       '`@typescript-eslint`': {
         ...tsEslintPlugin,
         rules: {
           ...tsEslintPlugin.rules,
+          // 该规则与当前 setup 不兼容,用 no-op 实现屏蔽而非直接 off,
+          // 以避免上游 extends 中不同层级重新启用该规则。
           'consistent-type-exports': noopRule,
         },
       },
     },

另外需确认:若任一被展开的旧配置层给 '@typescript-eslint/consistent-type-exports' 传入了规则选项(如 ['error', { fixMixedExportsWithInlineTypeSpecifier: true }]),noopRule.meta.schema 为空数组会导致 schema 校验失败。目前 npm run lint 已验证通过,说明当前没有此类选项传入,但后续若上游预设变更需重新留意。

🤖 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 83 - 93, The manual rebuild of the
`@typescript-eslint` plugin is correct, but the noopRule replacement for
consistent-type-exports in eslint.config.mjs should be documented so it is not
mistaken for dead code. Add a brief explanatory comment near the plugin
construction/normalizeConfig setup that references the intentional compatibility
workaround for consistent-type-exports and the known Flat Config plugin
redefinition issue. If you touch this area, keep the `@typescript-eslint` plugin
rebuild and normalizeConfig behavior intact, and make sure any future rule
options for consistent-type-exports are still considered against
noopRule.meta.schema.
🤖 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 83-93: The manual rebuild of the `@typescript-eslint` plugin is
correct, but the noopRule replacement for consistent-type-exports in
eslint.config.mjs should be documented so it is not mistaken for dead code. Add
a brief explanatory comment near the plugin construction/normalizeConfig setup
that references the intentional compatibility workaround for
consistent-type-exports and the known Flat Config plugin redefinition issue. If
you touch this area, keep the `@typescript-eslint` plugin rebuild and
normalizeConfig behavior intact, and make sure any future rule options for
consistent-type-exports are still considered against noopRule.meta.schema.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c85ab103-63cf-44d3-98f9-51ac03659d5c

📥 Commits

Reviewing files that changed from the base of the PR and between fd1c6bb and 470c05f.

📒 Files selected for processing (1)
  • eslint.config.mjs

@afc163

afc163 commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

Related to ant-design/ant-design#58514.

Copilot AI left a comment

Copy link
Copy Markdown

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 project’s maintenance/tooling dependencies and aligns configuration/docs to support newer React/TypeScript/ESLint ecosystems, including moving to ESLint’s flat config format and improving README branding links.

Changes:

  • Upgrades core frontend/tooling deps (React/React DOM, TypeScript, ESLint, Testing Library, types, lint tooling).
  • Migrates ESLint configuration from legacy .eslintrc.js to eslint.config.mjs (flat config) and adds global ambient typings.
  • Updates README (EN/ZH) Ant Design logo to link to https://ant.design and refreshes Jest snapshot header links.

Reviewed changes

Copilot reviewed 10 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsconfig.json Updates TS module resolution/settings and adjusts path mapping/includes for the upgraded toolchain.
eslint.config.mjs Introduces ESLint 9 flat config with React/TS/Jest presets and project-service parsing.
.eslintrc.js Removes legacy ESLint config in favor of flat config.
package.json Bumps and adds devDependencies for React/TS/ESLint/testing/linting ecosystem updates.
global.d.ts Adds global type references and ambient module declarations to reduce TS friction in the toolchain.
.github/dependabot.yml Enables grouped Dependabot updates for npm and GitHub Actions.
README.md Wraps Ant Design logo with a link to https://ant.design.
README.zh-CN.md Wraps Ant Design logo with a link to https://ant.design.
tests/__snapshots__/simple.test.tsx.snap Updates Jest snapshot header URL.
tests/__snapshots__/options.test.tsx.snap Updates Jest snapshot header URL.
tests/__snapshots__/index.test.tsx.snap Updates Jest snapshot header URL.
tests/__snapshots__/demo.test.tsx.snap Updates Jest snapshot header URL.

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

Comment thread eslint.config.mjs
Comment thread eslint.config.mjs
@afc163 afc163 force-pushed the codex/update-maintenance-deps branch from 9cdde3e to 1bcfb28 Compare July 3, 2026 03:35
@afc163 afc163 merged commit 717f99f into master Jul 3, 2026
15 checks passed
@afc163 afc163 deleted the codex/update-maintenance-deps branch July 3, 2026 12:32
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.

2 participants