-
Notifications
You must be signed in to change notification settings - Fork 38
chore: husky integration #136
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
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThis update introduces Husky pre-commit hooks and lint-staged formatting to the project's development workflow. Configuration files and scripts are added or modified to ensure that staged files are automatically formatted before commits. Additionally, a minor code formatting adjustment is made in a TypeScript file without altering its logic. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant Git (pre-commit)
participant Husky
participant lint-staged
participant Formatter
Developer->>Git (pre-commit): git commit
Git (pre-commit)->>Husky: Trigger pre-commit hook
Husky->>lint-staged: Run lint-staged
lint-staged->>Formatter: Run format on staged files
Formatter-->>lint-staged: Formatting complete
lint-staged-->>Husky: Done
Husky-->>Git (pre-commit): Allow commit if successful
Suggested reviewers
Poem
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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 (
|
|
Seems a bit excessive to add two new dependencies here. |
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: 2
🔭 Outside diff range comments (1)
package.json (1)
12-32: Align package script with the staged-only formatting approachIf you adopt the
format:stagedsolution above, remember to add the new script entry here (see diff in previous comment).
Without this adjustment, the hook will still format the whole project.Also applies to: 80-83
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
bun.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
.husky/pre-commit(1 hunks).lintstagedrc.json(1 hunks)package.json(2 hunks)src/renderer/src/routes/pdf-viewer/pdf-viewer/index.tsx(1 hunks)
🔇 Additional comments (1)
src/renderer/src/routes/pdf-viewer/pdf-viewer/index.tsx (1)
14-16: No functional change – looks goodPurely stylistic tweak; behaviour remains unchanged.
6b90448 to
ee50244
Compare
we can drop these changes and just keep in mind to format code before creating a PR |
51374e7 to
5667dc2
Compare
|
Hey @MHase, I'm looking to merge this PR, so can you resolve all of CodeRabbit's suggestions first? Many thanks 🙏 |
no changes are needed :) |
Added pre-commit hook using
huskytogehter withlint-stagedto format only changed files - not whole codebase.Run format on everything just to make sure codebase is clean and somehow updated
src/renderer/src/routes/pdf-viewer/pdf-viewer/index.tsxSummary by CodeRabbit