-
Notifications
You must be signed in to change notification settings - Fork 3
fix(lefthook): use pnpm #217
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
Conversation
commit: |
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.
Pull request overview
This PR updates the lefthook configuration to use pnpm instead of bun for running oxlint and oxfmt commands, and fixes a typo in the hook name from push: to pre-push:.
Key Changes:
- Replaces
bunwithpnpmfor oxlint and oxfmt commands in pre-commit hooks - Corrects the hook name from
push:topre-push:to match lefthook's expected naming convention
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: oxlint | ||
| glob: '*.{ts,tsx,js,jsx,mts,cts}' | ||
| run: bun oxlint --max-warnings=0 --type-aware --type-check --fix {staged_files} | ||
| run: pnpm oxlint --max-warnings=0 --type-aware --type-check --fix {staged_files} |
Copilot
AI
Dec 11, 2025
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.
The command pnpm oxlint should be pnpm exec oxlint or use the package.json script pnpm run format:oxlint. When running binaries from node_modules/.bin with pnpm, you need to use pnpm exec to execute them directly, or reference the npm script. The current command may fail because pnpm doesn't automatically run binaries like bun does.
| run: pnpm oxlint --max-warnings=0 --type-aware --type-check --fix {staged_files} | |
| run: pnpm exec oxlint --max-warnings=0 --type-aware --type-check --fix {staged_files} |
| - name: oxfmt | ||
| glob: '*' | ||
| run: bun oxfmt --no-error-on-unmatched-pattern {staged_files} | ||
| run: pnpm oxfmt --no-error-on-unmatched-pattern {staged_files} |
Copilot
AI
Dec 11, 2025
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.
The command pnpm oxfmt should be pnpm exec oxfmt or use the package.json script pnpm run format:oxfmt. When running binaries from node_modules/.bin with pnpm, you need to use pnpm exec to execute them directly, or reference the npm script. The current command may fail because pnpm doesn't automatically run binaries like bun does.
| run: pnpm oxfmt --no-error-on-unmatched-pattern {staged_files} | |
| run: pnpm exec oxfmt --no-error-on-unmatched-pattern {staged_files} |
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.
No issues found across 1 file
glebedel
left a comment
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.
LGTM
Summary by cubic
Switched lefthook to run oxlint/oxfmt via pnpm instead of bun and renamed the push hook to pre-push. This aligns hook tooling with our package manager and ensures the correct pre-push checks run.
Written for commit a1605c6. Summary will update automatically on new commits.