-
Notifications
You must be signed in to change notification settings - Fork 3.7k
feat: husky for prettier #7979
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
feat: husky for prettier #7979
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.
1 issue found across 4 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name=".husky/pre-commit">
<violation number="1" location=".husky/pre-commit:1">
Use npx with --no-install to avoid network installs and ensure deterministic hook behavior.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.
.husky/pre-commit
Outdated
| @@ -0,0 +1 @@ | |||
| npx lint-staged | |||
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.
Use npx with --no-install to avoid network installs and ensure deterministic hook behavior.
Prompt for AI agents
Address the following comment on .husky/pre-commit at line 1:
<comment>Use npx with --no-install to avoid network installs and ensure deterministic hook behavior.</comment>
<file context>
@@ -0,0 +1 @@
+npx lint-staged
</file context>
✅ Addressed in 352d53c
|
We did this at some point and removed because the husky job takes like 30 seconds on any commit and logs a bunch, as opposed to the targeted format by |
|
yeah the command here only formats staged files, I tried it and it took 1-2 seconds |
|
🎉 This PR is included in version 1.22.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.21.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
add a pre-commit hook to run husky
Summary by cubic
Set up a Husky pre-commit hook with lint-staged so Prettier formats staged files automatically. Also expanded .prettierignore to skip generated VSCode e2e outputs and other build folders.
Dependencies
Migration