-
Couldn't load subscription status.
- Fork 150
Added pre commit hook for staged file #887
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: dev
Are you sure you want to change the base?
Conversation
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.
Caution
Changes requested ❌
Reviewed everything up to d8b93e6 in 2 minutes and 13 seconds. Click for details.
- Reviewed
34lines of code in2files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. frontend/package.json:16
- Draft comment:
Consider using 'husky install frontend/.husky' (rather than 'husky frontend/.husky') and avoid '|| true' to prevent masking installation errors. - Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 0% vs. threshold = 50% The comment appears to be technically correct - 'husky install' is indeed the proper command according to husky's documentation, and '|| true' could mask installation errors. However, this is a dependency/setup related comment, and our rules explicitly state not to comment on dependency-related issues. Even though the suggestion is valid, it falls outside our review scope. The comment is technically accurate and could prevent potential issues with git hook installation. Am I being too strict with the dependency rule? No - the rules clearly state "Do NOT comment on dependency changes... or anything else related to dependencies." Husky is a dev dependency used for git hooks setup, so this falls squarely under that rule. While the comment makes a valid technical suggestion, it violates our rule about not commenting on dependency-related matters, so it should be removed.
2. frontend/package.json:176
- Draft comment:
Add a newline at the end of the file for consistency. - Reason this comment was not posted:
Comment did not seem useful. Confidence is useful =30%<= threshold50%The comment is asking for a newline at the end of the file, which is a common style guide requirement for consistency across files. However, it doesn't provide a specific code suggestion or address a potential issue with the code's functionality. It seems to be more of a stylistic preference rather than a necessary change for the code to function correctly.
Workflow ID: wflow_B9I05dU3gDh18ux6
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
frontend/package.json
Outdated
| "typescript": "5.8.3" | ||
| }, | ||
| "lint-staged": { | ||
| "*.{ts,tsx,mdx}": ["next lint --file","prettier --write"] |
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.
Ensure 'next lint --file' correctly receives staged filenames—adding an explicit placeholder might be beneficial.
| "*.{ts,tsx,mdx}": ["next lint --file","prettier --write"] | |
| "*.{ts,tsx,mdx}": ["next lint --file --", "prettier --write"] |
|
bugbot run |
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.
✅ Bugbot reviewed your changes and found no bugs!
45050e0 to
2689683
Compare
9b2cee0 to
5c7e284
Compare
Added pre commit hook for staged file
Issue #125
Important
Adds a pre-commit hook using Husky to run lint-staged on staged files in the frontend directory, ensuring linting and formatting before commits.
.husky/pre-committo runlint-stagedon staged files in thefrontenddirectory.package.jsonto include apreparescript for Husky setup.lint-stagedconfiguration topackage.jsonfor*.{ts,tsx,mdx}files to runnext lint --fileandprettier --write.This description was created by
for d8b93e6. You can customize this summary. It will automatically update as commits are pushed.