Skip to content

feat: replace pre-commit with husky#163

Merged
itziarZG merged 1 commit intodevelopfrom
husky
Apr 7, 2026
Merged

feat: replace pre-commit with husky#163
itziarZG merged 1 commit intodevelopfrom
husky

Conversation

@ctrl-alt-d
Copy link
Copy Markdown
Collaborator

Replace pre-commit with husky + lint-staged + commitlint

Why

pre-commit requires Python, which is an unnecessary dependency for a pure Node.js/Astro project. husky is the standard for git hooks in the JS ecosystem and integrates natively with pnpm.

Changes

  • Removed .pre-commit-config.yaml
  • Added husky, lint-staged, @commitlint/cli, @commitlint/config-conventional
  • .husky/pre-commit: runs astro check + prettier --check (via lint-staged, only on staged files)
  • .husky/commit-msg: validates conventional commits via commitlint
  • Updated README: removed Python/pre-commit from requirements

Same checks, same behavior

Before (pre-commit) After (husky)
astro check on commit astro check on commit
prettier --check on commit prettier --check on staged files
conventional-pre-commit @commitlint/config-conventional

After merging

  • Contributors only need pnpm install — hooks are configured automatically via the prepare script.
  • Python and the env/ virtualenv are no longer needed. Each contributor can delete their local env/ directory.

Copy link
Copy Markdown
Collaborator

@francescarpi francescarpi left a comment

Choose a reason for hiding this comment

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

Me gusta. Por mi adelante.

@ctrl-alt-d ctrl-alt-d marked this pull request as ready for review April 6, 2026 20:58
@ctrl-alt-d
Copy link
Copy Markdown
Collaborator Author

@itziarZG , si a ti también te gusta le das al merge.

@itziarZG
Copy link
Copy Markdown
Collaborator

itziarZG commented Apr 7, 2026

me gusta.. le doy

@itziarZG itziarZG changed the base branch from main to develop April 7, 2026 08:45
@itziarZG
Copy link
Copy Markdown
Collaborator

itziarZG commented Apr 7, 2026

he cambiado a develop

@itziarZG itziarZG merged commit 67d7cc3 into develop Apr 7, 2026
1 check passed
@itziarZG itziarZG deleted the husky branch April 7, 2026 08:46
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