Skip to content

chore: update maintenance dependencies#308

Open
afc163 wants to merge 17 commits into
masterfrom
codex/update-maintenance-deps
Open

chore: update maintenance dependencies#308
afc163 wants to merge 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

  • Documentation
    • 更新了项目说明与品牌展示,优化了页面顶部徽标的呈现方式和链接体验。
  • Bug Fixes
    • 补充了全局类型声明,提升 TypeScript、测试断言和样式导入的兼容性,减少开发与构建中的类型报错。
  • Chores
    • 升级了前端工具链与依赖配置,并调整了代码检查与依赖更新分组规则,便于后续维护。

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@afc163, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 22 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 12f7f12e-f1ca-4354-8665-752eb4c7dbc9

📥 Commits

Reviewing files that changed from the base of the PR and between 2cadd13 and d4e33a4.

⛔ Files ignored due to path filters (1)
  • tests/__snapshots__/index.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (5)
  • docs/index.md
  • eslint.config.mjs
  • global.d.ts
  • package.json
  • tsconfig.json

Walkthrough

本次变更迁移 ESLint 至 Flat Config 格式(新增 eslint.config.mjs,兼容旧 .eslintrc.js 规则),升级 React 19 及测试/类型相关依赖,新增 global.d.ts 全局类型声明,放宽 tsconfig 严格性并调整模块解析策略,更新 Dependabot 分组配置及 README 徽标展示。

Changes

工具链升级与类型兼容

Layer / File(s) Summary
依赖版本升级与 Dependabot 分组
`package.json`, `.github/dependabot.yml`
升级 React、测试库、类型声明及 ESLint/TS/Babel 相关 devDependencies 版本,并为 npm 与 github-actions 更新源新增通配分组配置。
ESLint Flat Config 迁移
`eslint.config.mjs`
新增 Flat Config 文件,借助 FlatCompat 转换旧版 `.eslintrc.js`,通过 normalizeConfig 过滤并保留部分 `@typescript-eslint/*` 规则,并追加规则覆盖项。
TypeScript 类型声明与编译配置
`global.d.ts`, `tsconfig.json`
新增全局模块声明(CSS/LESS/jsonp/moment 本地化)、扩展 JSX 与 jest matcher 类型;调整 moduleResolution、关闭 strict 系列选项、更新 paths 与 include。
README 徽标微调
`README.md`, `README.zh-CN.md`
调整顶部 Ant Design 徽标的展示结构、样式与超链接包裹。

Estimated code review effort: 2 (Simple) | ~12 minutes

Poem

兔子挥爪配置忙,Flat Config 换新装,
React 十九跃入笼,类型声明齐补上,
严格开关轻轻松,徽标闪闪指方向,
一蹦一跳齐升级,代码花园更亮堂!🐇✨

🚥 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.

@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 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.

Comment thread tsconfig.json Outdated
Comment thread tsconfig.json Outdated
Comment thread global.d.ts Outdated
Comment thread eslint.config.mjs
@socket-security

socket-security Bot commented Jun 29, 2026

Copy link
Copy Markdown

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.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm data-urls is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?npm/jest-environment-jsdom@30.4.1npm/data-urls@5.0.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/data-urls@5.0.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm rrweb-cssom is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?npm/jest-environment-jsdom@30.4.1npm/rrweb-cssom@0.8.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/rrweb-cssom@0.8.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

✅ Preview is ready!

PR preview ✅ Ready ✅ Ready
🔗 Preview https://react-component-checkbox-preview-pr-308.surge.sh
📝 Commitd4e33a4
⏱️ Build time20.143s
📦 Size1.6 MB (no change) · 28 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ d4e33a4 · react-component-checkbox-preview-pr-308.surge.sh (open ↗) · 2026-07-01 11:13:45 UTC

🤖 Powered by surge-preview

@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: 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

📥 Commits

Reviewing files that changed from the base of the PR and between 6aac89c and 13923a5.

📒 Files selected for processing (9)
  • .eslintignore
  • .github/dependabot.yml
  • README.md
  • README.zh-CN.md
  • eslint.config.mjs
  • global.d.ts
  • package.json
  • react-compat.d.ts
  • tsconfig.json
💤 Files with no reviewable changes (1)
  • .eslintignore

Comment thread global.d.ts Outdated
Comment thread global.d.ts Outdated
Comment thread react-compat.d.ts Outdated
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 d4e33a4.

@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 100.00%. Comparing base (6aac89c) to head (d4e33a4).

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.
📢 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.

🧹 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

📥 Commits

Reviewing files that changed from the base of the PR and between 541e4fd and 2cadd13.

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

@afc163

afc163 commented Jul 1, 2026

Copy link
Copy Markdown
Member Author

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

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.

1 participant