commit-sentry

raw JSON →
0.1.12 verified Fri May 01 auth: no javascript

Zero-config Git hooks that work consistently across Windows, macOS, and Linux. Version 0.1.12 auto-wires pre-commit, commit-msg, and pre-push hooks on npm install without manual husky setup. Ships with prettier and lint-staged, offers optional ESLint scaffolding via `setup-eslint`, includes a `rm-console` tag to strip console.log calls, and runs commit-time builds with Windows lock detection. Released bi-weekly, it focuses on solving cross-platform hook failures and fresh-clone readiness where husky alone falls short.

error bash: $'\r': command not found
cause Git hook files have Windows CRLF line endings on a Unix-based system
fix
Run 'npx commit-sentry update' to regenerate hooks with correct LF endings.
error Husky fails: 'git config core.hooksPath' not set
cause Manual husky install needed; commit-sentry sets it automatically but may fail in restricted environments
fix
Ensure .husky/ directory exists and re-run 'npm install' or 'npx commit-sentry update'.
gotcha Existing .husky/ files are preserved on install. Use 'npx commit-sentry update' to overwrite them.
fix Run 'npx commit-sentry update' after install if you want the default hooks.
gotcha Windows CRLF can cause 'bash: $'\r': command not found' errors. commit-sentry auto-heals this, but if you manually edit hooks, re-run the update command.
fix Run 'npx commit-sentry update' or ensure hook files are saved with LF line endings.
gotcha The 'rm-console' tag in commit messages only works on staged files; console.log in unstaged or untracked files is not affected.
fix Stage the files with console.log before committing with 'rm-console' in the message.
npm install commit-sentry
yarn add commit-sentry
pnpm add commit-sentry

Installs commit-sentry, auto-wires Git hooks, and shows how to verify, add ESLint, and bypass hooks for one-off commits.

npm install --save-dev commit-sentry
# Hooks are installed automatically.
# To verify:
git add .
git commit -m "test: verify hooks work"
# To add ESLint (optional):
npx commit-sentry setup-eslint
# To bypass hooks for a single commit:
HUSKY=0 git commit -m "wip"