Skip to content

chore: update maintenance dependencies#517

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

chore: update maintenance dependencies#517
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

  • 文档

    • 更新了项目首页与中文说明中的品牌徽标链接,可直接跳转到 Ant Design 官网。
  • 开发体验

    • 优化了代码检查、测试与类型环境,提升整体工具链一致性。
    • 补充了更完整的类型声明支持,减少类型提示缺失问题。
    • 调整了自动依赖更新分组规则,便于后续维护。

@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)
image Error Error Jul 2, 2026 3:58am

@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: 59 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: ec462c6e-9584-4e1f-b587-155c824d56d4

📥 Commits

Reviewing files that changed from the base of the PR and between 1535311 and 6bc4c7f.

⛔ Files ignored due to path filters (1)
  • tests/__snapshots__/basic.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (7)
  • .eslintrc.js
  • README.zh-CN.md
  • eslint.config.mjs
  • global.d.ts
  • package.json
  • src/Preview/index.tsx
  • tsconfig.json

Walkthrough

本次 PR 主要升级项目工具链:引入 ESLint Flat Config、调整 TypeScript 编译配置与相关依赖版本、新增全局类型声明与 React 兼容类型定义;同时对 dependabot 更新分组及中英文 README 徽标链接进行了微调。

Changes

构建/类型工具链升级

Layer / File(s) Summary
ESLint Flat Config 迁移
eslint.config.mjs
新增 Flat Config 文件,使用 FlatCompat 转换旧配置,筛选归一化 TypeScript 推荐规则,注册插件并覆盖规则集合,包括忽略目录与未使用变量规则。
TypeScript 配置与依赖升级
tsconfig.json, package.json
moduleResolution 改为 bundlermodule 设为 ESNext,关闭多项严格检查并扩展 includedevDependencies 中集中升级 ESLint/Babel/类型/React/TypeScript/husky/lint-staged 等版本。
全局类型声明补充
global.d.ts, react-compat.d.ts
新增样式/JSONP/moment locale 模块声明、JSX 命名空间类型、jest Matchers 扩展、全局 vi 类型,以及 React 的 ReactTextuseRefisValidElementcloneElement 兼容类型签名。

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

仓库配置与文档微调

Layer / File(s) Summary
Dependabot 更新分组配置
.github/dependabot.yml
为 npm 和 github-actions 两个更新源分别新增 groups 配置,使用通配模式归组匹配的更新项。
README 徽标链接化
README.md, README.zh-CN.md
中英文 README 顶部的 Ant Design 徽标由纯展示改为指向 ant.design 的可点击链接。

Estimated code review effort: 1 (Trivial) | ~5 minutes

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

Poem

兔子啃着配置文件蹦又跳 🐇
Flat Config 新装,类型更周到
tsconfig 松了绑,规则更明了
徽标变链接,点一点就报到
洞里升级完毕,胡萝卜庆功早早到 🥕

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了本次以维护依赖和工具链更新为主的变更。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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

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 updates the project's dependencies to React 19, TypeScript 6, and ESLint 9, introducing a flat ESLint configuration and compatibility type definitions. However, several feedback points should be addressed: strict type-checking flags in tsconfig.json should remain enabled to prevent runtime errors; manual 'any' declarations for Jest globals in global.d.ts should be removed to preserve strong typing; the deprecated 'ban-types' rule in ESLint should be updated to '@typescript-eslint/no-restricted-types'; global overrides for React 19 types in react-compat.d.ts should be avoided in favor of codebase compatibility; and '@typescript-eslint/no-unused-vars' should not be disabled globally.

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 global.d.ts Outdated
Comment thread eslint.config.mjs
Comment thread eslint.config.mjs Outdated
Comment thread react-compat.d.ts 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-image-preview-pr-517.surge.sh
📝 Commit6bc4c7f
⏱️ Build time17.111s
📦 Size18.1 MB (-28 B ⬇️) · 80 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ 6bc4c7f · react-component-image-preview-pr-517.surge.sh (open ↗) · 2026-07-02 04:00:43 UTC

🤖 Powered by surge-preview

@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.44%. Comparing base (b03f216) to head (6bc4c7f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #517   +/-   ##
=======================================
  Coverage   99.44%   99.44%           
=======================================
  Files          17       17           
  Lines         541      541           
  Branches      164      164           
=======================================
  Hits          538      538           
  Misses          3        3           

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

@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 6bc4c7f.

@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/react-component?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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
tsconfig.json (1)

5-5: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

建议切换到新版 JSX 转换(react-jsx)。

jsx 仍设置为经典的 "react" 转换,但项目已升级到 React 19。React 19 升级指南建议启用现代 JSX 转换(2020+),否则可能出现过时转换的告警,且无法享受新转换带来的构建体积/速度收益。

♻️ 建议改动
-    "jsx": "react",
+    "jsx": "react-jsx",

As per the provided React 19 documentation: "Enable the modern JSX Transform (2020+)." Without it you'll see: "Your app is using an outdated JSX transform."

🤖 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 `@tsconfig.json` at line 5, The TypeScript JSX setting is still using the
classic React transform, which is outdated for the React 19 upgrade. Update the
jsx option in tsconfig.json from the current classic setting to the modern
react-jsx transform so the project uses the newer JSX runtime and avoids
outdated-transform warnings.
🤖 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 20-27: Restore TypeScript strictness in tsconfig.json by removing
the explicit false overrides for noImplicitAny, strictNullChecks,
strictPropertyInitialization, strictFunctionTypes, strict, noImplicitThis, and
strictBindCallApply. Keep only the minimal compiler changes needed for the
upgrade, and if any strict flags must remain disabled temporarily, document the
reason and a follow-up plan in the PR. Locate the affected settings in
tsconfig.json and adjust the TypeScript configuration accordingly.

---

Nitpick comments:
In `@tsconfig.json`:
- Line 5: The TypeScript JSX setting is still using the classic React transform,
which is outdated for the React 19 upgrade. Update the jsx option in
tsconfig.json from the current classic setting to the modern react-jsx transform
so the project uses the newer JSX runtime and avoids outdated-transform
warnings.
🪄 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: 40a90fe8-c616-4c10-b210-5e1911b27af8

📥 Commits

Reviewing files that changed from the base of the PR and between b03f216 and 1535311.

📒 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 tsconfig.json Outdated
@vercel

vercel Bot commented Jul 1, 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

@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 updates the repo’s maintenance/tooling stack (React/TypeScript/ESLint/testing deps), migrates ESLint to a flat config compatible with ESLint 9 + typescript-eslint 8, and makes small documentation/infra hygiene updates (Ant Design logo links + Dependabot grouping).

Changes:

  • Migrate ESLint from .eslintrc.js to eslint.config.mjs (flat config) and update lint-related dependencies.
  • Update TypeScript config and add global.d.ts to centralize type references.
  • Update README branding links and Dependabot configuration for grouped updates.

Reviewed changes

Copilot reviewed 8 out of 10 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 include list (now includes global.d.ts).
global.d.ts Adds global type references and ambient module declarations.
eslint.config.mjs Introduces ESLint 9 flat config with React, Jest, and TypeScript ESLint integration.
.eslintrc.js Removes legacy ESLint config in favor of flat config.
package.json Updates core dev tooling dependencies (ESLint/TS/React/testing tooling).
.github/dependabot.yml Groups Dependabot updates for npm and GitHub Actions.
src/Preview/index.tsx Initializes imgRef with null for safer ref usage.
tests/__snapshots__/basic.test.tsx.snap Updates snapshot header URL.
README.md Wraps Ant Design logo with a link to https://ant.design.
README.zh-CN.md Same Ant Design logo link update + table formatting adjustments.

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

Comment thread eslint.config.mjs
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
Comment thread package.json
Comment on lines +63 to +66
"dumi": "^2.4.38",
"eslint": "^9.39.4",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-jest": "^29.15.4",
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