{"id":25626,"library":"git-commit-msg-linter","title":"git-commit-msg-linter","description":"A lightweight, independent, zero-configuration git commit message linter that enforces the Angular Commit Message Guidelines. Version 5.0.8 requires Node >= 14.0.0. It operates as a git 'commit-msg' hook, instantly checking every commit message and aborting if invalid. Unlike commitlint or other tools, it requires no setup, configuration files, or additional dependencies. Ships with TypeScript type definitions. Release cadence: irregular, with occasional updates.","status":"active","version":"5.0.8","language":"javascript","source_language":"en","source_url":"https://github.com/legend80s/commit-msg-linter","tags":["javascript","typescript"],"install":[{"cmd":"npm install git-commit-msg-linter","lang":"bash","label":"npm"},{"cmd":"yarn add git-commit-msg-linter","lang":"bash","label":"yarn"},{"cmd":"pnpm add git-commit-msg-linter","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This package is a hook; simply importing it in your Node.js project registers the git hook. TypeScript types are included.","wrong":"","symbol":"git-commit-msg-linter","correct":"import 'git-commit-msg-linter'"}],"quickstart":{"code":"// In your project root, run:\nnpm install git-commit-msg-linter --save-dev\n// Then commit:\ngit commit -m \"feat: add new feature\"\n// To test linting, try:\ngit commit -m \"bad commit\"\n// It will abort with a message listing valid types.","lang":"javascript","description":"Install the package as dev dependency; it automatically sets up a git commit-msg hook that lints future commit messages per Angular conventions."},"warnings":[{"fix":"Ensure .git is present before install, or use a conditional install script.","message":"The hook is installed only if the .git directory exists. In CI environments without .git, installation may silently fail.","severity":"gotcha","affected_versions":"*"},{"fix":"Upgrade Node.js to >=14.0.0 or pin to version 4.x.","message":"Node.js < 14.0.0 is no longer supported after version 5.0.0.","severity":"deprecated","affected_versions":">=5.0.0 <5.0.8"},{"fix":"Use correct filename: 'commitlinterrc.json' (no 'e' after 'lint').","message":"The hook uses 'commitlintrc.json' if present for customization, but the file name is easily misspelled as 'commitlintrc.json' (note the missing 'e' in 'linter').","severity":"gotcha","affected_versions":"*"},{"fix":"Install husky after git-commit-msg-linter, or configure husky to run the linter script.","message":"When using with husky v5+, the hook may not trigger because husky manages its own hooks. The order of installation matters.","severity":"gotcha","affected_versions":"*"},{"fix":"Backup existing hooks before installing.","message":"The package uses the 'gcm' hook; if you previously used another commit-msg hook, it may be overwritten.","severity":"deprecated","affected_versions":"*"},{"fix":"Ensure Node.js is in PATH and the shebang line in the hook file is correct (usually '#!/usr/bin/env node').","message":"In some environments (e.g., Windows with git bash), the hook may fail due to path issues. The error message is often unhelpful.","severity":"gotcha","affected_versions":"*"},{"fix":"Update commit messages to use valid types; adjust custom config if needed.","message":"Version 5.0.0 changed the default enforcements: 'temp' type removed, 'style' now allows scope.","severity":"breaking","affected_versions":"5.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use format like 'feat: add login button' or 'fix(scope): resolve crash'.","cause":"Commit message does not follow the Angular format: missing type or colon.","error":"git-commit-msg-linter: commit message is invalid"},{"fix":"Reinstall npm package or manually remove and re-add the hook via npm rebuild.","cause":"The hook file is missing due to failed installation or .git directory not present.","error":"fatal: cannot run .git/hooks/commit-msg: No such file or directory"},{"fix":"Run npm install with appropriate permissions (e.g., sudo on Unix).","cause":"The npm install script lacks write permission to the .git/hooks directory.","error":"Error: EACCES: permission denied, open '.git/hooks/commit-msg'"},{"fix":"Create 'commitlinterrc.json' in project root with correct spelling (no 'e' after 'lint').","cause":"Custom config file referenced but not found, or misspelled filename.","error":".commitlinterrc.json: no such file or directory"},{"fix":"Migrate to an alternative like @commitlint/cli or update to latest version if not deprecated.","cause":"The use of an outdated version that has been deprecated.","error":"npm WARN deprecated git-commit-msg-linter@5.0.8: This package is no longer maintained"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}