Skip to content

chore: standardize repository maintenance#62

Merged
afc163 merged 15 commits into
masterfrom
codex/standardize-rc-infra
Jul 3, 2026
Merged

chore: standardize repository maintenance#62
afc163 merged 15 commits into
masterfrom
codex/standardize-rc-infra

Conversation

@afc163

@afc163 afc163 commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Refresh README and README.zh-CN with centered heading, badges, Ant Design ecosystem branding, install, usage, development, release, and license sections.
  • Align Funding, grouped Dependabot updates, CodeQL, React Doctor, reusable test workflow, Surge preview, and Vercel preview configuration.
  • Align release documentation and scripts with @rc-component/np; remove legacy Now configuration where present.

Refs ant-design/ant-design#58514

Test

  • npm run lint\n- npm run tsc\n- npm run compile\n- npm test\n- npm run build\n- git diff --check
  • JSON parse check for package/config files
  • README consistency scan

Summary by CodeRabbit

  • New Features

    • 新增在线预览与自动检查流程,提升拉取请求中的预览体验与代码质量反馈。
  • Documentation

    • 重构并补充中英文文档,新增示例、API 说明、开发与发布指南。
    • 更新安装方式、许可证信息与项目介绍。
  • Bug Fixes

    • 优化类型与构建配置,提升开发、测试与发布过程的稳定性。

@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
overflow Error Error Jul 3, 2026 3:34am

@coderabbitai

coderabbitai Bot commented Jul 1, 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: 23 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: c04218d6-f7b5-4463-8545-7d891d64e101

📥 Commits

Reviewing files that changed from the base of the PR and between 3893644 and bef62a7.

📒 Files selected for processing (8)
  • .eslintrc.js
  • .github/workflows/main.yml
  • README.md
  • README.zh-CN.md
  • eslint.config.mjs
  • examples/fill-width.tsx
  • package.json
  • tests/wrapper.ts

Walkthrough

本次变更新增并更新了多个 GitHub Actions 工作流(CodeQL、React Doctor、Surge Preview、测试复用)、新增 FUNDING.yml 与扩展 dependabot.yml、新增 vercel.json 并移除 now.json、重写 README 文档并新增中文版,同时升级 ESLint Flat 配置、TypeScript 配置、package.json 依赖,并修正若干类型注解。

Changes

CI/CD 与部署配置

Layer / File(s) Summary
资助与依赖管理配置
.github/FUNDING.yml, .github/dependabot.yml
新增资助入口,扩展 dependabot 覆盖 npm 与 github-actions 两个生态,配置分组与限额。
CodeQL 工作流更新
.github/workflows/codeql.yml
更新定时计划 cron 表达式,语言矩阵改为 javascript-typescript,固定 Action 版本为 commit SHA。
新增 React Doctor、Surge Preview、测试工作流
.github/workflows/react-doctor.yml, .github/workflows/surge-preview.yml, .github/workflows/test.yml
新增三个工作流:代码分析、条件性 Surge 预览部署、复用远程测试工作流并传递 CODECOV_TOKEN。
部署配置文件
vercel.json, now.json
新增 vercel.json 定义 umijs 框架构建流程,移除旧的 now.json 静态构建配置。

估计代码审查工作量: 3(中等)| ~25 分钟

文档重写与构建/类型配置升级

Layer / File(s) Summary
README 文档重写与中文文档新增
README.md, README.zh-CN.md
重写英文 README 品牌头部、安装/用法示例、精简 API 表格、开发与发布流程、许可证链接,新增完整中文版文档。
ESLint Flat 配置、TypeScript 配置与依赖升级
eslint.config.mjs, tsconfig.json, package.json
重写 eslint.config.mjs 为 Flat 配置并实现规则过滤,调整 tsconfig 严格性与模块解析方式,更新 package.json 描述、脚本与批量升级开发依赖。
类型注解修正
global.d.ts, src/RawItem.tsx, examples/fill-width.tsx, tests/wrapper.ts
新增 .less 模块声明,调整 ComponentType 联合类型,为 useRef 添加显式泛型,为 mount 函数添加返回类型注解。

估计代码审查工作量: 3(中等)| ~25 分钟

Sequence Diagram(s)

sequenceDiagram
  participant PR as Pull Request
  participant Workflow as SurgePreviewWorkflow
  participant Build as npmBuild
  participant Surge as SurgeService
  PR->>Workflow: 触发 pull_request 事件
  Workflow->>Workflow: 检查 SURGE_TOKEN 是否存在
  Workflow->>Build: ut install / npm run build
  Build->>Surge: 部署 docs-dist 目录
  Surge-->>PR: 返回预览链接状态
Loading

Poem

小兔敲键盘,配置换新装,
CI 流水线,工作流成行,
README 换新颜,中文也登场,
*.less 有归处,类型更明朗,
🐇 蹦跳提交,一起去发布!

🚥 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/standardize-rc-infra

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

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 repository configuration, documentation, and dependencies. It adds GitHub Funding and Dependabot configurations, significantly improves the English and Chinese README files with usage examples and API tables, updates the Vercel deployment configuration, and introduces new scripts in package.json. Feedback is provided to add an exclude block in tsconfig.json to prevent type-checking compiled output directories, and to deduplicate the lint:tsc script in package.json by referencing the newly added tsc script.

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
Comment thread package.json
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

✅ Preview is ready!

PR preview ✅ Ready ✅ Ready
🔗 Preview https://react-component-overflow-preview-pr-62.surge.sh
📝 Commitbef62a7
⏱️ Build time24.524s
📦 Size1.8 MB · 43 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ bef62a7 · react-component-overflow-preview-pr-62.surge.sh (open ↗) · 2026-07-03 03:35:08 UTC

🤖 Powered by surge-preview

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.04%. Comparing base (64ea78f) to head (bef62a7).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
- Coverage   97.20%   97.04%   -0.17%     
==========================================
  Files           7        7              
  Lines         215      338     +123     
  Branches       78       98      +20     
==========================================
+ Hits          209      328     +119     
- Misses          6       10       +4     

☔ 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 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/react-component?upgradeToPro=build-rate-limit

@socket-security

socket-security Bot commented Jul 1, 2026

Copy link
Copy Markdown

@socket-security

socket-security Bot commented Jul 1, 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 Jul 1, 2026

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit bef62a7.

@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 (9)
README.md (1)

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

API 表格过于精简,缺少关键属性。

当前仅列出 datarenderItemrenderRest,但 maxCount(控制溢出行为的核心属性)和 itemKey(列表渲染标识)等常用属性缺失。建议补充 maxCountitemKey,或增加指向完整 TypeScript 类型定义的链接,以便用户了解完整接口。

 | Prop         | Description                      |
 | ------------ | -------------------------------- |
 | `data`       | Items rendered by Overflow.      |
 | `renderItem` | Render a visible item.           |
 | `renderRest` | Render collapsed overflow items. |
+| `maxCount`   | Maximum visible items, or `responsive`/`invalidate`. |
+| `itemKey`    | Unique key for items.            |
🤖 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 `@README.md` around lines 46 - 53, The API table in README is incomplete for
the Overflow component: it lists only data, renderItem, and renderRest, but
omits key props like maxCount and itemKey. Update the API section to include
these commonly used props and their descriptions, or add a clear reference to
the full TypeScript type definition for the Overflow component so users can find
the complete interface. Use the Overflow API table and its prop names as the
place to extend the documentation.
README.zh-CN.md (1)

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

中文翻译整体准确,结构与英文版保持一致。请同步应用对 README.md 提出的 API 表格补充与 ut install 修正。

 # 本地开发
 
 ```bash
-ut install
+npm install
 npm start
 npm test
 npm run lint

以及 API 表格补充:

 | 名称         | 说明                    |
 | ------------ | ----------------------- |
 | `data`       | Overflow 渲染的数据项。 |
 | `renderItem` | 渲染可见项。            |
 | `renderRest` | 渲染折叠后的溢出项。    |
+| `maxCount`   | 最大可见项数,或 `responsive`/`invalidate`。 |
+| `itemKey`    | 数据项的唯一标识。      |
🤖 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 `@README.zh-CN.md` around lines 46 - 78, 同步更新 README.zh-CN.md,使其与 README.md 的
API 表格和本地开发命令保持一致:在“API”表格中补充英文版新增的字段说明,并将“本地开发”中的 ut install 修正为 npm
install。重点检查 README.zh-CN.md 的“API”和“本地开发”小节,确保术语、表格内容和命令列表与英文版一致。
.github/workflows/surge-preview.yml (2)

40-46: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

冗余的 env 转发。

SURGE_TOKEN 已通过 env 设置,再通过 ${{ env.SURGE_TOKEN }} 转发给 surge_token 输入,其实可以直接引用 ${{ secrets.SURGE_TOKEN }},省去中间的 env 块。

🤖 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 @.github/workflows/surge-preview.yml around lines 40 - 46, The surge-preview
workflow step is redundantly forwarding SURGE_TOKEN through env before passing
it to afc163/surge-preview. Update the step to reference the secret directly in
the with.surge_token input, and remove the unnecessary env.SURGE_TOKEN
indirection while keeping the existing github_token and if condition intact.

35-49: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

构建步骤可能重复执行。

「Build preview」步骤已通过 ut install && npm run build 完成构建,但调用 afc163/surge-preview 时未传入 build 参数。该 action 的 build 输入默认值为 npm install\nnpm run build,因此会在 action 内部再次执行一次标准 npm 构建,导致构建重复执行,且内部构建使用 npm install 而非 ut install,可能与 utoo 安装的依赖产生不一致。

建议显式传入空的 build 参数(或等效的 no-op 命令)以跳过 action 内置的默认构建。

建议修复
       - uses: afc163/surge-preview@bf90a5a86111f6311ca42f0a5a0f80fb0fb03cec
         if: ${{ steps.surge-token.outputs.enabled == 'true' }}
         env:
           SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
         with:
           surge_token: ${{ env.SURGE_TOKEN }}
           github_token: ${{ secrets.GITHUB_TOKEN }}
           dist: docs-dist
+          build: echo "already built"
           failOnError: false
           setCommitStatus: false
🤖 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 @.github/workflows/surge-preview.yml around lines 35 - 49, The Surge preview
workflow is building twice because the separate “Build preview” step already
runs ut install and npm run build, but afc163/surge-preview is still using its
default internal build command. Update the surge-preview action invocation to
explicitly disable its built-in build by setting the build input to an
empty/no-op command, so the action only publishes the existing docs-dist output.
Use the existing steps.surge-token.outputs.enabled gate and the
afc163/surge-preview action block to locate the change.
.github/workflows/test.yml (1)

14-14: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

可复用工作流引用未固定版本。

该 PR 中其他 action 均已固定到具体 SHA(如 codeql.ymlsurge-preview.ymlreact-doctor.yml),但此处复用工作流引用了浮动的 @main 分支,上游变更会在无审查的情况下直接影响本仓库 CI,供应链风险与其他文件的固定策略不一致。

建议固定到具体 tag 或 commit SHA。

🤖 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 @.github/workflows/test.yml at line 14, The reusable workflow reference in
the test pipeline is using a floating branch instead of a pinned version, which
is inconsistent with the other pinned actions. Update the workflow call in the
test YAML to reference a specific immutable tag or commit SHA rather than `@main`,
using the existing workflow identifier as the location to make the change.
eslint.config.mjs (2)

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

规则过滤逻辑会静默丢弃规则,建议加日志提示。

normalizeConfig 会静默剔除所有不在 supportedTsRules 中的 @typescript-eslint/* 规则(以及全部 @babel/* 规则)。如果 .eslintrc.js 中存在拼写错误的规则名或规则在新版本中被重命名/移除,这里会悄悄失效而不会有任何提示,后续排查会比较困难。

♻️ 建议:过滤时输出警告
     next.rules = Object.fromEntries(
       Object.entries(next.rules).filter(([ruleName]) => {
         if (ruleName.startsWith('`@babel/`')) {
           return false;
         }
-        return !ruleName.startsWith('`@typescript-eslint/`') || supportedTsRules.has(ruleName);
+        const keep = !ruleName.startsWith('`@typescript-eslint/`') || supportedTsRules.has(ruleName);
+        if (!keep) {
+          console.warn(`[eslint.config.mjs] Dropping unsupported rule: ${ruleName}`);
+        }
+        return keep;
       }),
     );
🤖 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 22 - 37, normalizeConfig is silently dropping
unsupported ESLint rules, so add a warning when filtering them out instead of
removing them quietly. Update the rule filtering in normalizeConfig to detect
each excluded `@babel/`* and unsupported `@typescript-eslint/`* entry and emit a
concise log or warning that includes the rule name, while keeping the existing
filtering behavior intact. Use normalizeConfig and supportedTsRules as the main
touchpoints so the change is easy to locate.

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

全局关闭 @typescript-eslint/no-unused-vars 会削弱未使用变量检测。

tsconfig.jsonstrict: false 且未见 noUnusedLocals/noUnusedParameters,配合此处关闭 no-unused-vars,整个仓库将失去对未使用变量/参数的任何静态检测手段。建议至少保留该规则(或改用 TS 的 noUnusedLocals)。

🤖 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 55 - 63, The ESLint config currently disables
`@typescript-eslint/no-unused-vars` globally, which removes unused variable and
parameter detection across the repository. In eslint.config.mjs, keep this rule
enabled or replace it with TypeScript’s noUnusedLocals/noUnusedParameters in
tsconfig so unused declarations are still caught; locate the rule set in the
exported config where the other `@typescript-eslint` rules are toggled.
tests/wrapper.ts (1)

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

返回类型标注为 any,丢失了测试辅助函数的类型检查收益。

wrapper 对象结构在函数体内是完全已知的(findfindItemstriggerResizesetProps 等方法均有明确签名),标注为 any 会让所有测试文件失去对 mount() 返回值的类型检查与自动补全,且更容易掩盖测试中的拼写错误。建议提取一个具体的返回类型接口。

♻️ 建议:定义显式返回类型
-export function mount(element: React.ReactElement): any {
+export function mount(element: React.ReactElement) {

移除显式 : any 标注,让 TypeScript 从函数体推断出精确的返回类型(或提取一个 Wrapper interface 显式声明)。

🤖 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 `@tests/wrapper.ts` at line 127, `mount()` 的返回值被显式标成 `any`,导致测试辅助对象(如
`find`、`findItems`、`triggerResize`、`setProps`)失去类型检查和补全。请在 `mount` 函数上移除 `:
any`,或提取并使用一个明确的 `Wrapper` 返回类型接口,让 TypeScript 根据函数体推断出精确类型并保留测试代码的校验能力。
tsconfig.json (1)

4-4: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy lift

不要在 tsconfig.json:4 继续关闭 strict 这会让项目升级到 TypeScript 6 后仍停留在旧的宽松检查模式,错过默认开启的更强类型约束;如果当前还有阻塞问题,建议拆成后续清理逐步打开 strict / strictNullChecks

🤖 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 4, 不要在 tsconfig 的配置中继续保留关闭 strict 的设置;将 tsconfig.json
里的 strict 恢复为开启状态,并在相关配置项中逐步补齐因严格模式暴露出来的问题,优先检查与类型边界相关的代码并按需分阶段打开
strictNullChecks 等更细粒度选项,确保项目升级后使用更严格的 TypeScript 检查。
🤖 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 `@README.md`:
- Around line 54-74: The Development setup command is misspelled in the README;
update the install step in both README.md and README.zh-CN.md from the incorrect
`ut install` to the actual package install command, and keep the rest of the
workflow commands unchanged.

---

Nitpick comments:
In @.github/workflows/surge-preview.yml:
- Around line 40-46: The surge-preview workflow step is redundantly forwarding
SURGE_TOKEN through env before passing it to afc163/surge-preview. Update the
step to reference the secret directly in the with.surge_token input, and remove
the unnecessary env.SURGE_TOKEN indirection while keeping the existing
github_token and if condition intact.
- Around line 35-49: The Surge preview workflow is building twice because the
separate “Build preview” step already runs ut install and npm run build, but
afc163/surge-preview is still using its default internal build command. Update
the surge-preview action invocation to explicitly disable its built-in build by
setting the build input to an empty/no-op command, so the action only publishes
the existing docs-dist output. Use the existing
steps.surge-token.outputs.enabled gate and the afc163/surge-preview action block
to locate the change.

In @.github/workflows/test.yml:
- Line 14: The reusable workflow reference in the test pipeline is using a
floating branch instead of a pinned version, which is inconsistent with the
other pinned actions. Update the workflow call in the test YAML to reference a
specific immutable tag or commit SHA rather than `@main`, using the existing
workflow identifier as the location to make the change.

In `@eslint.config.mjs`:
- Around line 22-37: normalizeConfig is silently dropping unsupported ESLint
rules, so add a warning when filtering them out instead of removing them
quietly. Update the rule filtering in normalizeConfig to detect each excluded
`@babel/`* and unsupported `@typescript-eslint/`* entry and emit a concise log or
warning that includes the rule name, while keeping the existing filtering
behavior intact. Use normalizeConfig and supportedTsRules as the main
touchpoints so the change is easy to locate.
- Around line 55-63: The ESLint config currently disables
`@typescript-eslint/no-unused-vars` globally, which removes unused variable and
parameter detection across the repository. In eslint.config.mjs, keep this rule
enabled or replace it with TypeScript’s noUnusedLocals/noUnusedParameters in
tsconfig so unused declarations are still caught; locate the rule set in the
exported config where the other `@typescript-eslint` rules are toggled.

In `@README.md`:
- Around line 46-53: The API table in README is incomplete for the Overflow
component: it lists only data, renderItem, and renderRest, but omits key props
like maxCount and itemKey. Update the API section to include these commonly used
props and their descriptions, or add a clear reference to the full TypeScript
type definition for the Overflow component so users can find the complete
interface. Use the Overflow API table and its prop names as the place to extend
the documentation.

In `@README.zh-CN.md`:
- Around line 46-78: 同步更新 README.zh-CN.md,使其与 README.md 的 API
表格和本地开发命令保持一致:在“API”表格中补充英文版新增的字段说明,并将“本地开发”中的 ut install 修正为 npm install。重点检查
README.zh-CN.md 的“API”和“本地开发”小节,确保术语、表格内容和命令列表与英文版一致。

In `@tests/wrapper.ts`:
- Line 127: `mount()` 的返回值被显式标成 `any`,导致测试辅助对象(如
`find`、`findItems`、`triggerResize`、`setProps`)失去类型检查和补全。请在 `mount` 函数上移除 `:
any`,或提取并使用一个明确的 `Wrapper` 返回类型接口,让 TypeScript 根据函数体推断出精确类型并保留测试代码的校验能力。

In `@tsconfig.json`:
- Line 4: 不要在 tsconfig 的配置中继续保留关闭 strict 的设置;将 tsconfig.json 里的 strict
恢复为开启状态,并在相关配置项中逐步补齐因严格模式暴露出来的问题,优先检查与类型边界相关的代码并按需分阶段打开 strictNullChecks
等更细粒度选项,确保项目升级后使用更严格的 TypeScript 检查。
🪄 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: 6cd2fcf1-3ee4-4f4b-8947-05de88d32563

📥 Commits

Reviewing files that changed from the base of the PR and between 0db36fe and 3893644.

⛔ Files ignored due to path filters (4)
  • tests/__snapshots__/index.spec.tsx.snap is excluded by !**/*.snap
  • tests/__snapshots__/invalidate.spec.tsx.snap is excluded by !**/*.snap
  • tests/__snapshots__/raw.spec.tsx.snap is excluded by !**/*.snap
  • tests/__snapshots__/ssr.spec.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (17)
  • .github/FUNDING.yml
  • .github/dependabot.yml
  • .github/workflows/codeql.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .github/workflows/test.yml
  • README.md
  • README.zh-CN.md
  • eslint.config.mjs
  • examples/fill-width.tsx
  • global.d.ts
  • now.json
  • package.json
  • src/RawItem.tsx
  • tests/wrapper.ts
  • tsconfig.json
  • vercel.json
💤 Files with no reviewable changes (1)
  • now.json

Comment thread README.md
Copilot AI review requested due to automatic review settings July 2, 2026 03:55

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

Standardizes this repository’s maintenance setup (docs, tooling, CI, previews, and release workflow) to align with the broader Ant Design / rc-component ecosystem conventions.

Changes:

  • Refreshed English/Chinese READMEs with consistent branding, badges, usage, development, and release guidance.
  • Modernized tooling/config: ESLint flat config, updated dependencies, TypeScript config adjustments, and small typing tweaks in code/tests.
  • Aligned preview/CI automation: added reusable test workflow, Surge preview, React Doctor, Dependabot grouping, CodeQL updates, and Vercel config; removed legacy now.json.

Reviewed changes

Copilot reviewed 20 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vercel.json Adds Vercel build configuration targeting the docs build output.
tsconfig.json Updates TS compiler options and include/exclude patterns (currently introduces a compile-breaking config issue).
tests/wrapper.ts Adjusts mount typing in test utilities.
tests/__snapshots__/ssr.spec.tsx.snap Updates Jest snapshot header URL.
tests/__snapshots__/raw.spec.tsx.snap Updates Jest snapshot header URL.
tests/__snapshots__/invalidate.spec.tsx.snap Updates Jest snapshot header URL.
tests/__snapshots__/index.spec.tsx.snap Updates Jest snapshot header URL.
src/RawItem.tsx Updates allowed intrinsic element key type for component.
README.zh-CN.md Adds a new standardized Simplified Chinese README.
README.md Rewrites README into the standardized format with examples and release info.
package.json Updates description, scripts, and dependency/devDependency versions to current stack.
now.json Removes legacy Now/Vercel configuration.
global.d.ts Adds TypeScript module declaration for importing *.less.
examples/fill-width.tsx Updates refs initialization to null and keeps example behavior.
eslint.config.mjs Introduces ESLint v9 flat-config setup with TS/React/Jest rules.
.github/workflows/test.yml Adds reusable unit test workflow wiring via rc-test.
.github/workflows/surge-preview.yml Adds Surge-based PR preview workflow.
.github/workflows/react-doctor.yml Adds React Doctor automation workflow.
.github/workflows/codeql.yml Updates CodeQL workflow formatting, actions versions, and language matrix.
.github/FUNDING.yml Adds GitHub Sponsors / OpenCollective funding metadata.
.github/dependabot.yml Configures Dependabot updates with grouping for npm and GitHub Actions.
.eslintrc.js Removes legacy ESLint config in favor of flat config.

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

Comment thread examples/fill-width.tsx Outdated
Comment thread tests/wrapper.ts Outdated
@afc163 afc163 merged commit 8db9a04 into master Jul 3, 2026
15 of 16 checks passed
@afc163 afc163 deleted the codex/standardize-rc-infra 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