Skip to content

chore: standardize repository setup#299

Merged
afc163 merged 34 commits into
masterfrom
codex/standardize-rc-config
Jun 29, 2026
Merged

chore: standardize repository setup#299
afc163 merged 34 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Standardize this rc-component repository as part of the Ant Design rc-component maintenance sweep.

Tracking issue: ant-design/ant-design#58514

Scope

  • Redesign README.md and README.zh-CN.md with centered title, Ant Design ecosystem branding, aligned badges, scoped Bundlephobia badge, install command, Usage, Development, Release, and License sections.
  • Standardize package metadata, GitHub repo metadata, npm package name, package entry fields, types: "./es/index.d.ts", publishConfig, and release flow through @rc-component/np.
  • Align shared dependencies and scripts for React, testing-library, Jest/Vitest where existing, TypeScript, ESLint, Prettier, Less, dumi, father, Husky, lint-staged, and Dependabot.
  • Use the shared react-component/rc-test/.github/workflows/test-utoo.yml@main workflow, React Doctor, Codecov, CodeQL, updated GitHub Actions versions, and guarded Surge preview fallback.
  • Keep Vercel preview configuration compatible with docs-dist output and remove legacy now-build / Cloudflare Pages residue.
  • Keep API docs, demos, tests, TypeScript checks, funding metadata, and npm package files aligned with the repository standardization matrix.

Notes

  • No breaking runtime behavior is intended.
  • React peer dependency ranges are preserved when narrowing them would be a breaking change.
  • secrets: inherit is kept until react-component/rc-test#176 is merged, then it can be narrowed to explicit CODECOV_TOKEN forwarding.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

✅ Preview is ready!

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

↩️ Previous: ⚡️ 049909e · react-component-checkbox-preview-pr-299.surge.sh (open ↗) · 2026-06-29 06:25:55 UTC

🤖 Powered by surge-preview

@coderabbitai

coderabbitai Bot commented Jun 26, 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

更新了仓库文档、脚本、类型配置、GitHub Actions 工作流,以及文档预览和部署配置。

Changes

仓库文档与自动化

Layer / File(s) Summary
品牌与文档入口
.github/FUNDING.yml, README.md, README.zh-CN.md
新增资助配置,并将 README 顶部标题、徽标和中文文档切换到 @rc-component/checkbox
README 主体内容
README.md
重写 Highlights、Install、Usage、Examples 和 API 章节,并新增 Ref 表格。
README 维护说明
README.md, LICENSE
README 更新 Development、Release 和 License 段落,LICENSE 保留 MIT 条款文本。

CI 检查、预览部署与构建配置

Layer / File(s) Summary
脚本与类型配置
package.json, tsconfig.json
调整 prepareprettiertsclint-staged 命令,并更新路径映射与 include 范围。
CodeQL 与复用测试工作流
.github/workflows/codeql.yml, .github/workflows/main.yml
CodeQL action 版本被固定,复用测试工作流切换到 test-utoo.yml
React Doctor 工作流
.github/workflows/react-doctor.yml
新增 PR 和 master push 触发的 React Doctor 工作流,包含权限、并发和动作调用。
预览部署配置
.github/workflows/surge-preview.yml, .dumirc.ts, .gitignore, vercel.json
新增 Surge preview 工作流的条件执行与跳过分支,并补充文档/部署输出路径配置。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

我是一只小兔,蹦进新文档里,
徽标闪一闪,工作流排整齐。
预览轻轻开,路径悄悄移,
胡萝卜味代码,清清又欢喜。
🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/standardize-rc-config

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.

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8678193) to head (049909e).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #299   +/-   ##
=========================================
  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.

@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 repository configuration and documentation to align with the @rc-component/checkbox package. Key changes include adding a funding configuration, updating the README with modern examples and API tables, adding a Vercel deployment configuration, and adjusting scripts in package.json (such as switching from bunx to standard tsc and adding --ignore-unknown to Prettier). The reviewer suggested simplifying the lint-staged Prettier command for TypeScript files by removing the redundant --parser=typescript flag, which is already automatically inferred by Prettier.

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 package.json Outdated

@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)
package.json (1)

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

--ignore-unknown 与显式 --parser=typescript 的组合说明。

Line 45-46 中,*.ts?(x) 的 Prettier 命令同时使用了 --parser=typescript--ignore-unknown。由于已显式指定解析器,--ignore-unknown 对该匹配模式实际上不会生效(Prettier 已知如何处理),但也不会产生副作用。如果目的是统一配置风格,可以保留;若想精简,可移除该模式下的 --ignore-unknown

🤖 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 `@package.json` around lines 42 - 46, The `*.ts?(x)` Prettier task in
package.json redundantly combines `--parser=typescript` with `--ignore-unknown`;
since the parser is already explicit, simplify that matcher by removing the
unnecessary `--ignore-unknown` flag while keeping the TypeScript parser command
intact. Update the `*.ts?(x)` entry only, leaving the other glob patterns
unchanged.
🤖 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 @.github/workflows/main.yml:
- Around line 5-6: The reusable workflow call in the main GitHub Actions config
is using an unpinned ref and inheriting all secrets, which should be tightened.
Update the workflow reference to a specific commit SHA instead of `@main`, and
replace secrets: inherit with an explicit secret mapping that passes only
CODECOV_TOKEN to the reused workflow. Use the existing workflow call entry to
locate and adjust this external reuse configuration.

---

Nitpick comments:
In `@package.json`:
- Around line 42-46: The `*.ts?(x)` Prettier task in package.json redundantly
combines `--parser=typescript` with `--ignore-unknown`; since the parser is
already explicit, simplify that matcher by removing the unnecessary
`--ignore-unknown` flag while keeping the TypeScript parser command intact.
Update the `*.ts?(x)` entry only, leaving the other glob patterns unchanged.
🪄 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: 0a42061e-32d7-4f8a-9f4c-ecbf0b7342b2

📥 Commits

Reviewing files that changed from the base of the PR and between 8678193 and 0a06399.

📒 Files selected for processing (9)
  • .github/FUNDING.yml
  • .github/workflows/cloudflare-pages-preview.yml
  • .github/workflows/codeql.yml
  • .github/workflows/main.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • README.md
  • package.json
  • vercel.json

Comment thread .github/workflows/main.yml Outdated
@afc163

afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member Author

AI review follow-up:

  • Applied Gemini suggestion by removing the redundant explicit TypeScript parser from the lint-staged Prettier command.
  • Kept react-component/rc-test/.github/workflows/test-utoo.yml@main intentionally because this standardization tracks the shared rc-test workflow on main.
  • Did not replace secrets: inherit with an explicit CODECOV_TOKEN mapping because the called test-utoo.yml currently does not declare named workflow_call secrets; that should be changed in rc-test first if we want to tighten it globally.

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

🤖 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 @.github/workflows/surge-preview.yml:
- Around line 36-38: The “Skip Surge preview” step still has an incorrect
conditional and needs the same fix applied to the `if` expression used by that
step. Update the `Skip Surge preview` job step so it checks the Surge token
condition consistently with the workflow’s secret handling, and ensure the `if`
on the `Skip Surge preview` step is corrected together with the surrounding
preview logic.
- Around line 36-38: The “Skip Surge preview” workflow step is still using the
invalid secrets context in its if condition; update the step’s condition to use
the correct context pattern consistent with the rest of the workflow. Make the
same change in the Skip Surge preview step so the secret check is evaluated
without directly referencing secrets in the if expression.
- Around line 21-35: The step-level conditions in the surge-preview workflow are
using the invalid secrets context, so fix the Build preview step and the
afc163/surge-preview action to stop referencing secrets.SURGE_TOKEN directly in
their if clauses. Move SURGE_TOKEN to a job-level env and update the if checks
to use env.SURGE_TOKEN instead, keeping the existing build and surge-preview
configuration intact.
- Around line 21-35: The step-level condition in the workflow is using the
unsupported secrets context, which breaks validation for the Build preview and
surge-preview steps. Move SURGE_TOKEN to a job-level env so both the build step
and the afc163/surge-preview action can read it, then change the existing if
conditions to check the env context instead of secrets. Use the Build preview
step and afc163/surge-preview action as the places to update.

In `@README.zh-CN.md`:
- Around line 80-102: Checkbox 和 Ref 的 API 表格里把英文标识符误翻成了中文,需在 README.zh-CN.md
的相关表格中把 `风格` 改回 `style`、`价值` 改回 `value`、`模糊` 改回 `blur`、`重点` 改回
`focus`,并顺手统一这些条目的描述排版与空格;同时把“本机输入属性”改为“原生输入属性”,确保表格里的参数名与 `Checkbox`、`Ref` 里真实的
API 名称一致。
🪄 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: d89e8c11-4d1e-4576-90a5-bcf0c058fda1

📥 Commits

Reviewing files that changed from the base of the PR and between 67028d6 and c1df5f8.

📒 Files selected for processing (3)
  • .github/workflows/surge-preview.yml
  • README.md
  • README.zh-CN.md
✅ Files skipped from review due to trivial changes (1)
  • README.md

Comment thread .github/workflows/surge-preview.yml
Comment thread .github/workflows/surge-preview.yml
Comment thread README.zh-CN.md Outdated
@socket-security

socket-security Bot commented Jun 27, 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
Updatednpm/​husky@​9.0.5 ⏵ 9.1.7100 +110062 +180100
Addednpm/​@​testing-library/​react@​15.0.710010010087100
Addednpm/​eslint-plugin-unicorn@​56.0.18810010095100
Addednpm/​lint-staged@​16.4.010010010097100
Addednpm/​prettier@​3.9.1991009798100

View full report

@socket-security

socket-security Bot commented Jun 27, 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-unicorn is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: package.jsonnpm/eslint-plugin-unicorn@56.0.1

ℹ 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-unicorn@56.0.1. 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

@afc163 afc163 merged commit 6aac89c into master Jun 29, 2026
11 checks passed
@afc163 afc163 deleted the codex/standardize-rc-config branch June 29, 2026 07:01
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