-
-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add husky and lint-staged #1062
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Walkthrough此次更改引入了新的 Git 钩子配置和依赖项,主要涉及在提交之前对暂存文件进行 lint 检查。新增的 Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1062 +/- ##
=======================================
Coverage 98.21% 98.21%
=======================================
Files 39 39
Lines 1458 1458
Branches 435 406 -29
=======================================
Hits 1432 1432
Misses 26 26 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- .husky/pre-commit (1 hunks)
- package.json (2 hunks)
Files skipped from review due to trivial changes (1)
- .husky/pre-commit
Additional comments not posted (4)
package.json (4)
35-35
: 更新 prepare 脚本以包含 Husky。此更改将 Husky 集成到 prepare 脚本中,确保在执行 dumi setup 之前运行 Husky。这是一个合理的改动,因为它确保了 Git 钩子在项目准备阶段被正确设置。
43-45
: 添加 lint-staged 配置。此配置确保在提交前对所有暂存文件执行 Prettier 格式化。这是一个有效的方法来保持代码质量和一致性。请确保项目中已经安装了 Prettier,并且所有开发者都了解这一变更。
73-73
: 添加 Husky 依赖。通过将 Husky 添加到 devDependencies,确保了开发环境中 Git 钩子的可用性。版本号 "^9.1.5" 表明采用了兼容性较好的版本策略。
76-76
: 添加 lint-staged 依赖。将 lint-staged 添加到 devDependencies,支持提交前的代码质量检查。版本号 "^15.2.9" 同样采用了兼容性较好的版本策略。
add husky and lint-staged
Summary by CodeRabbit
lint-staged
配置,确保在提交前格式化所有文件。package.json
,添加了husky
和lint-staged
依赖,以支持新的开发工作流。