chore: standardize repository tooling#1229
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Walkthrough新增 React Doctor 和 Surge Preview 工作流,补充 Vercel 构建配置;重写 README 的结构、使用说明、API 和发布信息;并在 Changes项目自动化与文档更新
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the README.md with modernized API documentation, usage examples, and development instructions, and updates tsconfig.json to include configuration and source directories. The review feedback suggests updating the README usage example to use the recommended 'options' prop instead of the legacy 'Option' component. Additionally, it points out that including '.fatherrc.js' in tsconfig.json without enabling 'allowJs' will cause a TypeScript compilation error.
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.
| import Select, { Option } from '@rc-component/select'; | ||
| import '@rc-component/select/assets/index.css'; | ||
|
|
||
| export default () => ( | ||
| <Select> | ||
| <Option value="jack">jack</Option> | ||
| <Option value="lucy">lucy</Option> | ||
| <Option value="yiminghe">yiminghe</Option> | ||
| </Select> | ||
| import React from 'react'; | ||
| import { createRoot } from 'react-dom/client'; | ||
|
|
||
| createRoot(document.getElementById('root')!).render( | ||
| <Select placeholder="Select a user"> | ||
| <Option value="jack">Jack</Option> | ||
| <Option value="lucy">Lucy</Option> | ||
| <Option value="yiminghe">Yiminghe</Option> | ||
| </Select>, | ||
| ); |
There was a problem hiding this comment.
The main usage example in the README uses the legacy Option component. However, the API documentation below explicitly states that Option is a legacy placeholder component and recommends preferring the options prop for new usage. Updating the usage example to use the options prop maintains consistency and promotes best practices.
| import Select, { Option } from '@rc-component/select'; | |
| import '@rc-component/select/assets/index.css'; | |
| export default () => ( | |
| <Select> | |
| <Option value="jack">jack</Option> | |
| <Option value="lucy">lucy</Option> | |
| <Option value="yiminghe">yiminghe</Option> | |
| </Select> | |
| import React from 'react'; | |
| import { createRoot } from 'react-dom/client'; | |
| createRoot(document.getElementById('root')!).render( | |
| <Select placeholder="Select a user"> | |
| <Option value="jack">Jack</Option> | |
| <Option value="lucy">Lucy</Option> | |
| <Option value="yiminghe">Yiminghe</Option> | |
| </Select>, | |
| ); | |
| import Select from '@rc-component/select'; | |
| import '@rc-component/select/assets/index.css'; | |
| import React from 'react'; | |
| import { createRoot } from 'react-dom/client'; | |
| const options = [ | |
| { value: 'jack', label: 'Jack' }, | |
| { value: 'lucy', label: 'Lucy' }, | |
| { value: 'yiminghe', label: 'Yiminghe' }, | |
| ]; | |
| createRoot(document.getElementById('root')!).render( | |
| <Select placeholder="Select a user" options={options} />, | |
| ); |
| } | ||
| } | ||
| }, | ||
| "include": [".dumirc.ts", ".fatherrc.js", "src", "tests", "docs"] |
There was a problem hiding this comment.
Including .fatherrc.js in the include array without enabling "allowJs": true in compilerOptions causes TypeScript to throw an error during compilation (e.g., error TS6054: File '.fatherrc.js' has an unsupported extension). To resolve this, add "allowJs": true to the compilerOptions section of tsconfig.json.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1229 +/- ##
==========================================
+ Coverage 99.44% 99.47% +0.03%
==========================================
Files 31 31
Lines 1263 1339 +76
Branches 462 491 +29
==========================================
+ Hits 1256 1332 +76
Misses 7 7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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/react-doctor.yml:
- Around line 18-20: The checkout step is currently persisting the GitHub token
into local git config by default, which can expose credentials to later actions
in the same job. Update the actions/checkout@v5 usage in the workflow to
explicitly set persist-credentials to false alongside fetch-depth so the token
is not stored.
- Around line 18-21: The workflow currently uses mutable Action tags and leaves
checkout credentials persisted, so update the actions in the workflow to pinned
commit SHAs for both actions/checkout and millionco/react-doctor, and add
persist-credentials: false under the checkout step. Use the existing
actions/checkout and millionco/react-doctor steps to locate the changes.
In `@README.md`:
- Around line 86-96: The SearchConfig table is documenting incorrect defaults
for filterOption and optionFilterProp; only autoClearSearchValue has a real
runtime default. Update the README entry for SearchConfig so filterOption and
optionFilterProp no longer show default values (or mark them as none), and keep
the descriptions aligned with the actual behavior in the search config handling.
🪄 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: 1c17bf59-520f-4101-b8b8-3fe5bed8a7b8
📒 Files selected for processing (3)
.github/workflows/react-doctor.ymlREADME.mdtsconfig.json
d9f9b8e to
f4de537
Compare
✅ Preview is ready!
↩️ Previous: ⚡️ 🤖 Powered by surge-preview |
|||||||||||||||
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 17-18: This workflow still uses floating action tags and leaves
checkout credentials persisted, which expands supply-chain and token exposure
risk. Update the `actions/checkout` step to disable credential persistence, and
pin both `actions/checkout` and `afc163/surge-preview` in the workflow to
immutable version identifiers (preferably full commit SHAs) so the exact action
code cannot drift over time.
🪄 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: 1c40c8a9-df2e-4cdb-a2c8-25fe24961083
📒 Files selected for processing (5)
.github/workflows/react-doctor.yml.github/workflows/surge-preview.ymlREADME.mdtsconfig.jsonvercel.json
✅ Files skipped from review due to trivial changes (2)
- tsconfig.json
- README.md
f4de537 to
c329ff3
Compare
c329ff3 to
ba6ddbf
Compare
|
React Doctor found no new issues. 🎉 Reviewed by React Doctor for commit |

Summary
@rc-component/selectheader, package-specific emoji description, focused highlights, install, usage, examples, API, development, and release sections.npm install @rc-component/selectcommand, and add a subtle Ant Design ecosystem note.prepublishOnlyrelease flow.test-utoo.yml..docdumi build output.master..github/FUNDING.ymlto Ant Design sponsorship entries.optionsprop in README usage and correcting SearchConfig defaults.Compatibility
No runtime code changes. This should not introduce breaking changes.
Verification
npm run lintnpm testnpm run tscnpm run compilenpm run buildgit diff --checkRefs ant-design/ant-design#58514