{"id":26631,"library":"wangtron-lint-commit","title":"wangtron-lint-commit","description":"A simple commit message linter that enforces conventional commit format. v1.1.3 is the latest stable release. It checks commit messages against a configurable pattern, with custom error messages. Minimal dependencies, zero-config setup. Uses local git hooks via husky or lint-staged.","status":"active","version":"1.1.3","language":"javascript","source_language":"en","source_url":"https://github.com/EvansJWang/lint-commit","tags":["javascript"],"install":[{"cmd":"npm install wangtron-lint-commit","lang":"bash","label":"npm"},{"cmd":"yarn add wangtron-lint-commit","lang":"bash","label":"yarn"},{"cmd":"pnpm add wangtron-lint-commit","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Git hooks setup for commit linting","package":"husky","optional":true}],"imports":[{"note":"Package is ESM-only since v1.1.0.","wrong":"const lintCommit = require('wangtron-lint-commit')","symbol":"lintCommit","correct":"import { lintCommit } from 'wangtron-lint-commit'"}],"quickstart":{"code":"// .husky/commit-msg\nimport { lintCommit } from 'wangtron-lint-commit';\nimport { readFileSync } from 'fs';\nconst message = readFileSync(process.argv[2], 'utf8');\nconst { valid, error } = lintCommit(message);\nif (!valid) {\n  console.error(error);\n  process.exit(1);\n}","lang":"typescript","description":"Shows how to use lintCommit in a Husky commit-msg hook to validate commit messages."},"warnings":[{"fix":"Provide custom regex option.","message":"Default config only enforces 'type(scope): description' format. Custom regex required for advanced rules.","severity":"gotcha","affected_versions":"<=1.1.3"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Set \"type\": \"module\" in package.json or use .mjs extension.","cause":"Husky script not using ES modules","error":"SyntaxError: Cannot use import statement outside a module"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}