Skip to content

Conversation

@ryoppippi
Copy link
Member

@ryoppippi ryoppippi commented Dec 11, 2025

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.

@ryoppippi ryoppippi requested a review from a team as a code owner December 11, 2025 16:59
Copilot AI review requested due to automatic review settings December 11, 2025 16:59
@ryoppippi ryoppippi enabled auto-merge (squash) December 11, 2025 17:00
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 11, 2025

Open in StackBlitz

npm i https://pkg.pr.new/StackOneHQ/stackone-ai-node/@stackone/ai@217

commit: a1605c6

Copy link

Copilot AI left a 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 bun with pnpm for oxlint and oxfmt commands in pre-commit hooks
  • Corrects the hook name from push: to pre-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}
Copy link

Copilot AI Dec 11, 2025

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.

Suggested change
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}

Copilot uses AI. Check for mistakes.
- name: oxfmt
glob: '*'
run: bun oxfmt --no-error-on-unmatched-pattern {staged_files}
run: pnpm oxfmt --no-error-on-unmatched-pattern {staged_files}
Copy link

Copilot AI Dec 11, 2025

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.

Suggested change
run: pnpm oxfmt --no-error-on-unmatched-pattern {staged_files}
run: pnpm exec oxfmt --no-error-on-unmatched-pattern {staged_files}

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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

Copy link
Contributor

@glebedel glebedel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ryoppippi ryoppippi merged commit e65099b into main Dec 12, 2025
17 checks passed
@ryoppippi ryoppippi deleted the fix-lefthook branch December 12, 2025 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants