Skip to content

chore: update maintenance dependencies#1494

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

chore: update maintenance dependencies#1494
afc163 wants to merge 15 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 顶部品牌徽标为可点击外链,指向 Ant Design。
  • Bug Fixes
    • 调整测试对 scrollIntoView 调用上下文的模拟方式,提升测试稳定性。
  • Chores
    • 升级 React 开发依赖到 19.2.7,并同步更新 TypeScript/ESLint 等工具链配置;补充全局类型声明,增强对常见资源导入的支持。

@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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b229aa2a-3b25-409c-a0e3-033a295545fd

📥 Commits

Reviewing files that changed from the base of the PR and between e4123fd and e7f0e02.

📒 Files selected for processing (7)
  • .eslintrc.js
  • README.md
  • README.zh-CN.md
  • eslint.config.mjs
  • global.d.ts
  • package.json
  • tsconfig.json
💤 Files with no reviewable changes (2)
  • .eslintrc.js
  • tsconfig.json
✅ Files skipped from review due to trivial changes (4)
  • README.md
  • README.zh-CN.md
  • global.d.ts
  • eslint.config.mjs

Walkthrough

本次变更迁移 ESLint 配置为 Flat Config,调整 TypeScript 编译与全局类型声明,升级开发依赖与 React 版本,补充分组型 Dependabot 配置,并修改 README 顶部徽标链接及测试模拟签名。

Changes

工具链与依赖升级

Layer / File(s) Summary
ESLint Flat Config 迁移
eslint.config.mjs
改为 defineConfig([...]) 组织 Flat 配置,覆盖通用 JS/React/TS 规则、测试规则、全局忽略项和 src 下的 TypeScript 项目解析配置。
TypeScript 配置与全局类型声明
tsconfig.json, global.d.ts
moduleResolution 切换为 bundlerinclude 补入 global.d.ts;新增测试、React、Node 与资源模块的全局类型声明。
依赖版本升级
package.json, tests/refs.spec.tsx
更新 ESLint、TypeScript、React 及相关开发依赖版本,并将 scrollIntoView 模拟的 this 类型改为 HTMLElement
Dependabot 分组与 README 链接
.github/dependabot.yml, README.md, README.zh-CN.md
为 npm 和 GitHub Actions 更新条目新增 groups 分组,并将 README 顶部徽标改为可点击的 ant.design 链接图片。

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

Poem

我是一只小兔跳呀跳,
配置换新不胡闹,
Flat Config 排排好,
React 和类型一起跑,
README 里徽标亮闪闪 🐰

🚥 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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 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.

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

React Doctor found no issues. 🎉

Reviewed by React Doctor for commit e7f0e02.

@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 eslint-plugin-react is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: package.jsonnpm/eslint-plugin-react@7.37.5

ℹ 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/eslint-plugin-react@7.37.5. 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

@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 dependencies (including React 19, TypeScript 6, and ESLint 9), introduces a flat ESLint configuration, adds global type definitions, and groups Dependabot updates. Feedback focuses on improving type safety and robustness: specifically, it is highly recommended to keep strict type checking enabled in tsconfig.json rather than disabling it, to use explicit this parameter typing in tests/refs.spec.tsx instead of an unsafe type assertion, and to apply optional chaining in eslint.config.mjs to avoid potential runtime errors.

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 tests/refs.spec.tsx Outdated
Comment thread eslint.config.mjs Outdated
@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown

❌ Deploy failed

PR preview ❌ Failed ❌ Failed
🔗 Preview https://react-component-table-preview-pr-1494.surge.sh (may be unavailable)
📝 Commite7f0e02
🪵 LogsView logs
📋 Build log (last lines)
npm warn exec The following package was not found and will be installed: surge@0.27.4

   Running as afc163@gmail.com (Student)

        project: ./docs-dist
         domain: react-component-table-preview-pr-1494.surge.sh
           size: 227 files, 2.9 MB

   Aborted - you do not have permission to publish to react-component-table-preview-pr-1494.surge.sh

🤖 Powered by surge-preview

@vercel

vercel Bot commented Jun 30, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
table Ready Ready Preview, Comment Jul 2, 2026 4:11am

@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.04%. Comparing base (14b74e6) to head (e7f0e02).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1494   +/-   ##
=======================================
  Coverage   99.04%   99.04%           
=======================================
  Files          45       45           
  Lines        1362     1362           
  Branches      409      409           
=======================================
  Hits         1349     1349           
  Misses         13       13           

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

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
global.d.ts (1)

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

改为直接引用 Vitest 的 vi 类型

项目已经依赖并运行 Vitest,测试里也在使用 vi.mockvi.importActualvi.advanceTimersByTimevi.clearAllMocks 等 API;手写子集后续很容易和真实类型漂移。直接复用官方类型更稳妥。

建议修复
-declare const vi: {
-  fn: <T extends (...args: any[]) => any = (...args: any[]) => any>(
-    implementation?: T,
-  ) => jest.MockedFunction<T>;
-  mock: (moduleName: string, factory?: (importOriginal: <T>() => Promise<T>) => unknown) => void;
-  spyOn: typeof jest.spyOn;
-  useFakeTimers: () => void;
-  useRealTimers: () => void;
-  advanceTimersByTime: (msToRun: number) => void;
-  clearAllTimers: () => void;
-  runAllTimers: () => void;
-  importActual: <T>(moduleName: string) => Promise<T>;
-  clearAllMocks: () => void;
-  resetAllMocks: () => void;
-  restoreAllMocks: () => void;
-};
+declare const vi: typeof import('vitest').vi;
🤖 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 `@global.d.ts` around lines 32 - 47, The manual vi declaration in vi’s global
typing should be replaced with the official Vitest vi type so it stays aligned
with the real API surface. Update the global.d.ts declaration that defines vi to
reference Vitest’s exported type instead of listing a handwritten subset, and
keep the existing test helpers like vi.mock, vi.importActual, and
vi.advanceTimersByTime working through the official typing.
🤖 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-47: The TS rule filtering in normalizeConfig is too narrow
because it only keeps rules from recommendedTsRules, which will drop legacy but
still-used `@typescript-eslint` rules like no-empty-interface and
no-inferrable-types and change lint behavior during migration. Update the
filtering logic to validate against the full tsEslintPlugin.rules set instead of
just recommended, and make sure the local consistent-type-exports shim remains
preserved when building the final rules object.

In `@package.json`:
- Around line 99-104: React 19 compatibility is blocked by
react-dnd-html5-backend and react-window, whose peer dependencies still only
declare support for older React versions. Update the dependency entries in
package.json by replacing or upgrading react-dnd-html5-backend and react-window
to versions that explicitly support react@19/react-dom@19, while leaving
react-dnd as-is since it already accepts any React version. Verify the package
manifest and lockfile stay consistent after the dependency change.

In `@README.md`:
- Line 62: The installation command in the README is a typo: replace the
गैर-standard “ut install” with “npm install” in the setup instructions. Update
both affected occurrences in the install steps so the documented commands are
consistent with the rest of the npm-based workflow (e.g. npm start, npm run
lint) and users can follow the setup correctly.

In `@README.zh-CN.md`:
- Around line 62-64: The install command in the README is a typo: update the
affected install instructions in the README.zh-CN content so they use npm
install instead of ut install, matching the standard npm-based setup and the
same wording used elsewhere in the docs. Keep the change limited to the install
command text in the relevant README sections.

---

Nitpick comments:
In `@global.d.ts`:
- Around line 32-47: The manual vi declaration in vi’s global typing should be
replaced with the official Vitest vi type so it stays aligned with the real API
surface. Update the global.d.ts declaration that defines vi to reference
Vitest’s exported type instead of listing a handwritten subset, and keep the
existing test helpers like vi.mock, vi.importActual, and vi.advanceTimersByTime
working through the official typing.
🪄 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: 2f0b9d67-3fa8-4eb2-a270-976864c17037

📥 Commits

Reviewing files that changed from the base of the PR and between 14b74e6 and e4123fd.

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

Comment thread eslint.config.mjs Outdated
Comment thread package.json
Comment thread README.md Outdated
Comment thread README.zh-CN.md Outdated
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 1 day (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 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.

Pull request overview

Note

Copilot couldn't run its full agentic review because no GitHub Actions runner was available. Make sure your repository has a runner available to run Copilot's review, or add a copilot-setup-steps.yml file specifying one with the runs-on attribute. See the docs for more details.

Updates project maintenance tooling and docs by modernizing TypeScript/ESLint setup, refreshing dependencies, and improving branding links.

Changes:

  • Migrate ESLint to flat config (ESLint 9 + typescript-eslint 8) and update related lint dependencies
  • Update React/TypeScript/testing/tooling dependencies and adjust TS config/type includes
  • Link Ant Design logo in READMEs to https://ant.design and group Dependabot updates

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tsconfig.json Updates module resolution and compiler options; restructures path mappings and include/exclude lists
tests/refs.spec.tsx Adjusts scrollIntoView typing for stricter TS compatibility
package.json Refreshes React/TS/ESLint/testing/lint-staged dependencies and adds flat-config-related packages
global.d.ts Adds global type references and ambient module declarations
eslint.config.mjs Introduces ESLint flat configuration with React/TS/Jest integrations
README.md Wraps Ant Design logo with link to https://ant.design
README.zh-CN.md Wraps Ant Design logo with link to https://ant.design
.github/dependabot.yml Adds grouping for npm and GitHub Actions Dependabot updates
.eslintrc.js Removes legacy ESLint config (replaced by flat config)

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

Comment thread eslint.config.mjs
Comment on lines +17 to +19
linterOptions: {
reportUnusedDisableDirectives: 'off',
},
Comment thread eslint.config.mjs
Comment on lines +63 to +66
'no-extra-boolean-cast': 'off',
'no-undef': 'off',
'no-unused-vars': 'off',
'react/no-find-dom-node': 'off',
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