Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL
All skills

setup-pre-commit

Set up Husky pre-commit hooks that run Prettier, type checking, and tests before each commit.

When to use it

You have a JavaScript repo with no commit-time checks and want formatting and tests to run automatically before commits.

For example

You say

Use setup-pre-commit to add pre-commit hooks to my pnpm TypeScript repo so staged files get formatted and tests run before each commit.

You get
  • Husky pre-commit hook
  • lint-staged and Prettier config
  • Committed setup changes

How it works

  • Detects your package manager from lockfiles and adapts commands accordingly.
  • Skips typecheck and test lines if those scripts are missing, and tells you.