Uh oh!
There was an error while loading. Please reload this page.
fix: import from @rc-component/util package root - #621
Conversation
Imports from `@rc-component/util/lib/*` are blocked by the `no-restricted-imports` lint rule wired into `npm run compile`, causing the build to fail. Switch all six call sites to the package root export.
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
概览此 PR 将 改动
预估审查工作量🎯 1 (简单) | ⏱️ ~5 分钟 建议审查人
诗歌
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/Popup/index.tsxESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. src/UniqueProvider/index.tsxESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. src/hooks/useAlign.tsESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.
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 simplifies and cleans up import statements across several files by replacing deep internal imports from @rc-component/util/lib/... with direct named imports from the root @rc-component/util package. There are no review comments, and I have no additional feedback to provide.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@## master #621 +/- ##
==========================================
+ Coverage 97.26% 97.28% +0.01%
==========================================
Files 17 17 Lines 952 956 +4 Branches 274 274 ==========================================
+ Hits 926 930 +4
Misses 26 26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Summary
npm run compile失败,因为father-plugin注入的no-restricted-importslint 规则禁止从@rc-component/*/lib/**子路径导入,需要改为包根导入。This PR replaces all 6
@rc-component/util/lib/*imports with named imports from the package root.Affected files
src/Popup/index.tsxsrc/UniqueProvider/index.tsxsrc/hooks/useAlign.tssrc/hooks/useWatch.tssrc/hooks/useWinClick.tssrc/index.tsxNotes
warninginuseWinClick.tsswitches from the always-fire namedwarningto the package root's default export (which iswarningOnce). This is dev-only and dedup is preferable for a same-shadow-root sanity check that would otherwise spam on every effect re-run.Test plan
npm run compilepassesnpm test— 130 passed / 1 pre-existing skipSummary by CodeRabbit
发版说明
用户影响: 此版本无任何用户可见的功能变更,仅涉及内部代码结构调整。