chore: setup husky and lint-staged pre-commit hook#206
Conversation
|
Warning Review limit reached
More reviews will be available in 3 minutes and 10 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. 📝 WalkthroughWalkthroughAdds Husky and lint-staged, configures a ChangesPre-commit Linting Infrastructure
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
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 `@package.json`:
- Around line 17-21: The lint-staged config in package.json incorrectly matches
monorepo files and ignores staged filenames because it uses "*.{js,jsx}" with
the web-dashboard npm run lint that executes "eslint ."; update lint-staged to
scope patterns to the web-dashboard directory (e.g.,
"apps/web-dashboard/**/*.{js,jsx}") and invoke eslint directly so lint-staged
will pass filenames (replace the current "npm run lint --workspace=web-dashboard
--" entry with a direct "eslint" command), and if other workspaces need linting
add workspace-specific patterns referencing their eslint configs (e.g.,
apps/dashboard-api/**/* .js -> "eslint --config
apps/dashboard-api/eslint.config.js") so each workspace is linted with the
correct config and only staged files are checked.
🪄 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: defaults
Review profile: CHILL
Plan: Pro
Run ID: 4107ab00-3b39-4d4f-b2ef-aceb1c4cda9a
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (2)
.husky/pre-commitpackage.json
🚀 Pull Request Description
Fixes #202
Set up Husky and lint-staged to run ESLint on staged JavaScript/React files before commits.
Changes Made:
🛠️ Type of Change
🧪 Testing & Validation
Backend Verification:
npm testin thebackend/directory and all tests passed.Frontend Verification:
npm run lintin thefrontend/directory.📸 Screenshots / Recordings (Optional)
✅ Checklist
Built with ❤️ for urBackend.
Summary by CodeRabbit