pre-commit-check

Run Husky pre-commit hooks for format, lint, and test checks.

80|49|Updated Mar 27, 2022
One-click install
npx skills add https://github.com/cartridge-gg/controller --skill pre-commit-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit-check
Source: https://github.com/cartridge-gg/controller/tree/main/.agents/skills/pre-commit-check
Command: npx skills add https://github.com/cartridge-gg/controller --skill pre-commit-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures code quality and consistency by running pre-commit checks before commits to catch formatting, lint, and tests issues early.

Core Features & Use Cases

  • Automated pre-commit checks to enforce formatting, linting, and test execution.
  • Seamless integration with Husky and local workflows to prevent pushing broken changes.
  • Suitable for JavaScript/TypeScript projects using pnpm in team environments.

Quick Start

Run the pre-commit workflow locally to verify formatting, linting, and tests pass before committing.

Frequently Asked Questions about pre-commit-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate pre-commit checks for formatting, linting, and tests?

Pre-commit checks validate code by running formatting, linting, and test scripts through Husky hooks before a commit finalizes. This local validation pipeline prevents broken changes from being pushed to the repository.

How do I run lint and format checks before every git commit in JavaScript?

Running lint and format checks before every git commit requires configuring Husky pre-commit hooks to trigger pnpm scripts. This ensures your JavaScript or TypeScript code meets formatting and linting standards locally before committing.

Does automated pre-commit checking work with pnpm and TypeScript projects?

Automated pre-commit checking works with pnpm and TypeScript projects by leveraging Husky hooks. It executes defined project scripts for format, lint, test, and build to validate changes locally before pushing.

What is the best way to prevent pushing broken code in a team environment?

The best way to prevent pushing broken code is enforcing pre-commit quality checks using Husky hooks. This automates formatting, linting, and test execution locally to guarantee a reliable pipeline before code is committed in team workflows.

Do I need specific pnpm scripts configured to use pre-commit hooks?

You need specific pnpm scripts configured for pre-commit hooks to function. The automation relies on project scripts explicitly named format, lint, test, and build to execute the validation pipeline correctly.