Skip to content

chore: update maintenance dependencies#308

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

chore: update maintenance dependencies#308
afc163 merged 19 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
    • 更新 README 与 README.zh-CN 顶部品牌/徽标区域:调整展示结构并为徽标提供链接体验;更新安装说明以移除特定包的 pnpm 命令。
  • Bug Fixes
    • 补齐全局 TypeScript 模块类型声明(含样式、jsonp、moment 语言包),提升样式/本地化导入与测试相关的类型兼容性。
  • Chores
    • 升级与调整项目工具链与配置:引入 ESLint Flat Config、更新 React/Jest 与类型依赖、调整 tsconfig 编译选项,并细化依赖更新分组规则。

@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 19 及相关依赖,补充全局类型声明,调整 TypeScript 模块解析与包含项,并同步更新 Dependabot、README 和安装文档。

Changes

工具链升级与类型兼容

Layer / File(s) Summary
依赖升级与自动更新分组
package.json, .github/dependabot.yml
更新 React、测试、ESLint、TypeScript 与相关开发依赖版本,并为 npm 与 github-actions 更新源新增分组配置。
ESLint Flat Config 迁移
eslint.config.mjs
新增 Flat Config 导出,承载通用规则、TS 专属规则与测试文件规则,并替换旧 ESLint 配置路径。
类型声明与编译配置
global.d.ts, tsconfig.json
新增 Jest、Node、React、ReactDOM 与模块声明,调整 moduleResolutionpathsinclude
README 与安装说明
README.md, README.zh-CN.md, docs/index.md
调整顶部徽标展示方式,并移除文档中的 pnpm 安装命令。

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

Suggested reviewers: zombieJ

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.

@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
Addednpm/​jest@​30.4.21001007092100
Updatednpm/​@​types/​react@​18.3.31 ⏵ 19.2.17100 +11007995100
Updatednpm/​@​eslint/​js@​8.57.1 ⏵ 9.39.4100100100 +1488100
Updatednpm/​typescript@​5.9.3 ⏵ 6.0.3100 +110090 +19690
Updatednpm/​eslint@​8.57.1 ⏵ 9.39.497 +110010096 +46100

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

@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
📝 Commitb24ed6e
⏱️ Build time19.925s
📦 Size1.6 MB (+1.2 KB ⬆️) · 28 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ b24ed6e · react-component-checkbox-preview-pr-308.surge.sh (open ↗) · 2026-07-03 03:00:12 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 b24ed6e.

@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 (b24ed6e).

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.

Copilot AI review requested due to automatic review settings July 2, 2026 03:54

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 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/.eslintignore to eslint.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.

Comment thread eslint.config.mjs
@afc163 afc163 merged commit 41817cd into master Jul 3, 2026
13 checks passed
@afc163 afc163 deleted the codex/update-maintenance-deps branch July 3, 2026 12:30
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