[PR #4994] [CLOSED] feat: husky pre-commit hook #5701

Closed
opened 2026-03-13 12:32:17 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4994
Author: @dvanmali
Created: 9/30/2025
Status: Closed

Base: canaryHead: husky


📝 Commits (1)

  • 93dc75c feat: husky pre-commit hook

📊 Changes

3 files changed (+179 additions, -0 deletions)

View changed files

.husky/pre-commit (+1 -0)
📝 package.json (+10 -0)
📝 pnpm-lock.yaml (+168 -0)

📄 Description

Add lint as a pre-commit hook via husky package. Prevents failing lint tests before it runs in git workflow. lint-staged only performs lint on staged commit to speed local linting.

Husky could also require commit message format such as feat, fix, etc. according to requirements but not including it in this PR.


Summary by cubic

Add a Husky pre-commit hook that runs lint-staged to auto-fix lint issues and format files before commits, catching problems before CI. This speeds up local checks and keeps commits clean.

  • New Features

    • Pre-commit runs npx lint-staged on staged files.
    • lint-staged runs: pnpm lint:fix, pnpm format, then re-adds files.
    • Added prepare script to install Husky hooks. Commit message rules are not included.
  • Dependencies

    • Added dev deps: husky ^9.1.7, lint-staged ^16.2.3.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4994 **Author:** [@dvanmali](https://github.com/dvanmali) **Created:** 9/30/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `husky` --- ### 📝 Commits (1) - [`93dc75c`](https://github.com/better-auth/better-auth/commit/93dc75cb3a5eac74bf97554c34b26463bf70f374) feat: husky pre-commit hook ### 📊 Changes **3 files changed** (+179 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `.husky/pre-commit` (+1 -0) 📝 `package.json` (+10 -0) 📝 `pnpm-lock.yaml` (+168 -0) </details> ### 📄 Description Add lint as a pre-commit hook via `husky` package. Prevents failing lint tests before it runs in git workflow. `lint-staged` only performs lint on staged commit to speed local linting. Husky could also require commit message format such as `feat`, `fix`, etc. according to requirements but not including it in this PR. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Add a Husky pre-commit hook that runs lint-staged to auto-fix lint issues and format files before commits, catching problems before CI. This speeds up local checks and keeps commits clean. - **New Features** - Pre-commit runs npx lint-staged on staged files. - lint-staged runs: pnpm lint:fix, pnpm format, then re-adds files. - Added prepare script to install Husky hooks. Commit message rules are not included. - **Dependencies** - Added dev deps: husky ^9.1.7, lint-staged ^16.2.3. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 12:32:17 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#5701