Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@benhigham/commitlint-config

benhigham112MIT0.1.3

My personal commitlint configuration based on the Conventional Commits standard.

commitlint, changelog, check, checker, code, commit, config, consistency, convention, conventional-commits, enforce, format, git, lint, linter, message, quality, rules, semantic, standard, strict, style, styleguide, validate, verify, workflow

readme

@benhigham/commitlint-config

npm version npm downloads License

My personal commitlint configuration based on the Conventional Commits standard.

Features

  • Based on @commitlint/config-conventional
  • Provides consistent, structured commit messages
  • Integrates with Atom-style changelogs
  • Pre-configured formatting rules

Installation

# npm
npm install --save-dev @benhigham/commitlint-config

# yarn
yarn add --dev @benhigham/commitlint-config

# pnpm
pnpm add --save-dev @benhigham/commitlint-config

Usage

Use in commitlint.config.js:

/** @type {import('@commitlint/types').UserConfig} */
const config = {
  extends: ['@benhigham/commitlint-config'],
  // your overrides here
};

export default config;

With Git Hooks

For the best experience, use with lefthook or husky to enforce commit message formatting:

Example with lefthook

# lefthook.yml
commit-msg:
  commands:
    lint-commit:
      run: pnpm exec commitlint --edit {1}

Example with husky

# Install husky
npm install --save-dev husky
# Set up the commit-msg hook
npx husky add .husky/commit-msg 'npx commitlint --edit $1'

Commit Message Format

This configuration enforces the Conventional Commits format:

<type>[(optional scope)]: <description>

[optional body]

[optional footer(s)]

Types

  • feat: A new feature
  • fix: A bug fix
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code
  • refactor: A code change that neither fixes a bug nor adds a feature
  • perf: A code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit

Requirements

License

This project is licensed under the MIT License.

changelog

@benhigham/commitlint-config

0.1.3

Patch Changes

0.1.2

Patch Changes

0.1.1

Patch Changes

0.1.0

Minor Changes