Registry / devops / babel-preset-commitlint

babel-preset-commitlint

JSON →
library9.0.1jsnpmunverified

Babel preset for commitlint, a tool that lints commit messages against configurable rules. This package provides a Babel preset configuration for commitlint, useful when using commitlint with Babel. The current stable version is 9.0.1 (last released on 2021-05-20), part of the commitlint v9 series. Note that commitlint itself has evolved to v17+, and babel-preset-commitlint may be obsolete; the modern approach is to use `@commitlint/cli` directly with conventional-changelog presets. This package has minimal maintenance and is likely deprecated or superseded by other commitlint packages.

npm install babel-preset-commitlint
INSTALL
IMPORT
SIG · BABEL-PRESET-COMMI
B
babel-preset-commitlint
devopsjavascriptv9.0.1
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
module.exports = require('babel-preset-commitlint')
import preset from 'babel-preset-commitlint'
This is a Babel preset exported as CommonJS; it should be used in Babel config files via require.

Shows how to configure Babel preset in Babel config to enable commitlint linting.

// In .babelrc or babel.config.js module.exports = { presets: [ 'babel-preset-commitlint' ] }; // Then run commitlint as usual, e.g., commitlint -E HUSKY_GIT_PARAMS
Debug
Known issues
deprecatedbabel-preset-commitlint is outdated; commitlint has evolved and this preset is no longer maintained.
fix
Use @commitlint/cli directly and configure via commitlint.config.js instead of relying on Babel preset.
affects: >=9.0.0
breakingcommitlint v9 introduced breaking changes; babel-preset-commitlint@9.0.1 may not work with newer commitlint versions.
fix
Upgrade to @commitlint/cli and configure without the Babel preset.
affects: >=9.0.0
gotchaThis preset is intended for use with commitlint, but it is a separate package; users often mistakenly think it replaces the commitlint CLI.
fix
Install @commitlint/cli as the main linting tool; babel-preset-commitlint only provides Babel integration.
affects: >=9.0.0
Errors
Common errors & fixes
Error: Cannot find module 'babel-preset-commitlint'
The package is not installed or is missing from node_modules.
fix
Run npm install --save-dev babel-preset-commitlint to install it.
Error: Preset 'babel-preset-commitlint' requires a BABEL_ENV or NODE_ENV
The preset may need an environment variable set, but it's not documented.
fix
Set BABEL_ENV or NODE_ENV to 'production', 'development', or 'test' as needed.
Upgrade
Version history
9.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
babel-preset-commitlint — npm install babel-preset-commitlint · libregistry