run-pre-commit-checks

Run ESLint, TypeScript checks, and Mocha unit tests before commits.

10|2|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/mahmoud20138/Claude-Skills-Collection --skill run-pre-commit-checks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: run-pre-commit-checks
Source: https://github.com/mahmoud20138/Claude-Skills-Collection/tree/main/05-VSCode-Extension-Skills/run-pre-commit-checks
Command: npx skills add https://github.com/mahmoud20138/Claude-Skills-Collection --skill run-pre-commit-checks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill automates the essential checks required before committing code, preventing common errors and maintaining code integrity.

Core Features & Use Cases

  • Automated Linting: Enforces code style and catches potential issues using ESLint.
  • Type Checking: Verifies TypeScript types to prevent runtime errors.
  • Unit Testing: Runs all unit tests to ensure existing functionality is not broken.
  • Use Case: Before submitting a new feature, run this skill to guarantee your code adheres to project standards and passes all tests, saving review time and preventing regressions.

Quick Start

Run the pre-commit checks using the command npm run lint followed by npm run compile-tests and npm run unittest.

Frequently Asked Questions about run-pre-commit-checks

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

FAQPage Schema
How do I run pre-commit checks for a VS Code extension?

To run pre-commit checks for a VS Code extension, execute npm run lint, npm run compile-tests, and npm run unittest to validate ESLint rules, TypeScript types, and Mocha tests before committing code.

What is automated pre-commit validation for TypeScript code?

Automated pre-commit validation for TypeScript code is the process of enforcing ESLint rules and type checking to prevent runtime errors and maintain code integrity before changes are committed to the repository.

How do I automate linting and unit tests before committing code?

You automate linting and unit tests before committing by running the designated npm scripts sequentially, which enforces code style, verifies TypeScript types, and executes Mocha unit tests to prevent regressions.

Does this pre-commit validation work with Mocha unit tests and ESLint?

Yes, this pre-commit validation works with Mocha unit tests and ESLint, executing the necessary npm scripts to verify code style, check TypeScript types, and ensure existing functionality is not broken before a commit.

Why do I need to run pre-commit checks for code quality?

You need to run pre-commit checks for code quality to prevent common errors, enforce project standards, save review time, and guarantee that new features do not introduce regressions or break existing functionality.

What are the limitations of running manual pre-commit checks?

Running manual pre-commit checks introduces the limitation of human error, as developers may forget to execute the required linting, type checking, and unit testing commands, leading to unverified code being committed.