Registry / testing / commitlint-config-patternplate

commitlint-config-patternplate

JSON →
library20.5.3jsnpmunverified

Lint your commits, patternplate-style. This is a shareable commitlint configuration that enforces the patternplate commit convention, based on conventional-changelog. Current stable version is 20.5.3 (April 2026). Release cadence is frequent (~every few weeks) with minor patches and features. Key differentiator: opinionated patternplate style with specific header, scope, and footer rules. Requires commitlint v20 and Node >=v18. ESM-only since v20.

npm install commitlint-config-patternplate
INSTALL
IMPORT
SIG · COMMITLINT-CONFIG-
C
commitlint-config-patternplate
testingjavascriptv20.5.3
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.

config-patternplate
import config from 'commitlint-config-patternplate'
const config = require('commitlint-config-patternplate')
ESM-only since v20; CJS require() will fail with ERR_REQUIRE_ESM
default config
export default { extends: ['@commitlint/config-conventional'] }
module.exports = { extends: ['commitlint-config-patternplate'] }
Use CJS config file (.commitlintrc.cjs) if project uses require()
rules
import { rules } from 'commitlint-config-patternplate'
import rules from 'commitlint-config-patternplate/rules'
Named export 'rules' available, not a separate file

Configures commitlint with patternplate style, overriding header max length to 72 characters.

// .commitlintrc.js import patternplate from 'commitlint-config-patternplate'; export default { extends: [patternplate], rules: { 'header-max-length': [2, 'always', 72], }, };
commitlint --version
Debug
Known issues
breakingcommitlint v20 drops support for Node <18
fix
Upgrade Node to v18 or higher
affects: >=20.0.0
breakingv20 is ESM-only, CJS require() will throw ERR_REQUIRE_ESM
fix
Use dynamic import() in CJS or switch to ESM config (.commitlintrc.js with type:module)
affects: >=20.0.0
deprecatedThe 'config-patternplate' package no longer ships separate CJS bundle; use .mjs or .js with type:module
fix
Add 'type': 'module' to package.json or rename config to .commitlintrc.mjs
affects: >=20.0.0
gotchaRules imported from 'commitlint-config-patternplate' are mutable; modifying returned object affects global config
fix
Deep clone the rules object before mutation: structuredClone(rules)
affects: >=1.0.0
gotchaAvoid referencing 'commitlint-config-patternplate' as a file path; use npm package name only
fix
Set extends to 'commitlint-config-patternplate' (string), not ./node_modules/...
affects: >=1.0.0
Errors
Common errors & fixes
Error [ERR_REQUIRE_ESM]: require() of ES Module /path/to/node_modules/commitlint-config-patternplate/index.js from /path/to/.commitlintrc.js not supported.
Config file uses require() but package is ESM-only.
fix
Rename config to .commitlintrc.mjs or use dynamic import: const config = await import('commitlint-config-patternplate');
Cannot find module '@commitlint/config-conventional'
Missing peer dependency '@commitlint/config-conventional'.
fix
Run: npm install --save-dev @commitlint/config-conventional
Invalid rule definition: rule 'xxx' must be a function or array of functions
Mistyped rule name or incorrect rule format.
fix
Check rule names from patternplate configuration (e.g., header-max-length, scope-case) and ensure they are arrays [level, applicable, value]
TypeError: Cannot read properties of undefined (reading 'some')
commitlint version incompatibility; v20 changed internal rule API.
fix
Upgrade commitlint and all config packages to v20: npm install commitlint@latest @commitlint/cli@latest commitlint-config-patternplate@latest
Upgrade
Version history
20.5.3latest on npm
Audit
Dependencies
@commitlint/config-conventionalrequiredextended base config providing conventional commit rules
@commitlint/lintrequiredruntime peer for resolving and applying rules
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
2
Resources
commitlint-config-patternplate — npm install commitlint-config-patternplate · libregistry