Registry / devops / apollus-commitlint

apollus-commitlint

JSON →
library1.0.21jsnpmunverified

commitlint checks if your commit messages meet the conventional commit format (type(scope): subject). Current stable version is v20.5.3, actively maintained with frequent releases (multiple per month). Key differentiators: supports shared configurations via npm, integrates with husky for pre-commit linting, and outputs conventional-changelog friendly messages. Replaced all lodash dependencies with es-toolkit/compat in v20.5.3. Works with Node >=8, but ESM-only since v20.

npm install apollus-commitlint
INSTALL
IMPORT
SIG · APOLLUS-COMMITLINT
A
apollus-commitlint
devopsjavascriptv1.0.21
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import commitlint from '@commitlint/cli'
const commitlint = require('@commitlint/cli')
ESM-only since v20; CommonJS require throws ERR_REQUIRE_ESM
load
import { load } from '@commitlint/cli'
Named export for loading config
lint
import { lint } from '@commitlint/cli'
Named export for programmatic linting

Shows local installation, config export, CLI usage, and husky integration for linting commit messages.

// install: npm install --save-dev @commitlint/{cli,config-conventional} // commitlint.config.js export default { extends: ['@commitlint/config-conventional'] }; // lint via CLI: npx commitlint --from HEAD~1 --to HEAD // or use husky hook: // npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}'
commitlint --version
Debug
Known issues
breakingESM-only since v20; CommonJS require throws ERR_REQUIRE_ESM
fix
Convert to ESM (use import, add 'type': 'module' to package.json) or use dynamic import()
affects: >=20.0.0
deprecatedlodash.* dependencies replaced with es-toolkit/compat in v20.5.3
fix
No action needed; but if you depended on lodash internals, migrate to es-toolkit or substitute
affects: >=20.5.3
gotchaThe --edit flag expects a file path; using $1 in husky commit-msg hook requires correct shell escaping
fix
Use 'npx --no -- commitlint --edit ${1}' (with double quotes) in .husky/commit-msg
affects: *
gotchaConfig resolution may pick up unexpected files if multiple config files exist (commitlint.config.js, .commitlintrc.js, etc.)
fix
Ensure only one config file is present, or use --config to specify explicitly
affects: *
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module not supported
Using require() to load @commitlint/cli in a CommonJS project after v20
fix
Switch to import or use dynamic import: const commitlint = await import('@commitlint/cli')
commitlint: Unknown rule: <rule-name>
Rule name misspelled or not recognized by config
fix
Check available rules at https://conventional-changelog.github.io/commitlint/#/reference-rules
commitlint: Could not resolve config
Config file not found or malformed
fix
Ensure commitlint.config.js exists with proper module.exports or export default
Upgrade
Version history
1.0.21latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
apollus-commitlint — npm install apollus-commitlint · libregistry