New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@cmss/git-hooks-tool

Package Overview
Dependencies
Maintainers
5
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cmss/git-hooks-tool

A tool to handle Git commit hooks

latest
npmnpm
Version
2.2.0
Version published
Maintainers
5
Created
Source

Git Hooks Tool

A tool to handle Git commit hooks using Husky.

Installation

请先安装pnpm

pnpm add @cmss/git-hooks-tool -D

Usage

.husk文件夹下增加prepare-commit-msg脚本,内容如下

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

exec < /dev/tty
pnpm exec prepare-commit ${1} 

.husk文件夹下增加commit-msg脚本,内容如下

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm exec lint-commit ${1} 

请确保husky下的脚本有可执行权限. 如果husky版本>=9,请移除 #! /usr/bin/env sh. "$(dirname -- "$0")/_/husky.sh"

Keywords

git

FAQs

Package last updated on 07 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts