Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>commitlintNew to Visual Studio Code? Get it now.

commitlint

Josh Bolduc

|
3,024 installs
| (1) | Free
Integrate commitlint into the VS Code commit editor
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-commitlint

A VS Code extension that integrates commitlint into VS Code's commit editor.

Install from the Visual Studio Marketplace

Animation of a commit message with linting issues being corrected

Features

  • Runs commitlint against your commit message as you write it
  • Reports lint errors and warnings in the editor
  • Highlights relevant parts of the commit based on the specific issue
  • Auto detects commitlint configuration by default
  • Supports all commitlint rules
  • Adds autocomplete support to package.json and .commitlintrc.json based on the configuration schema

Requirements

This extension assumes you use VS Code as your Git editor and have configured commitlint in your project.

Settings

commitlint.config.extend.rules

Commitlint rules which will be extended.

Example configuration as JSON syntax:

"commitlint.config.extend.rules": {
  "body-leading-blank": [1, "always"],
  "body-max-line-length": [2, "always", 100],
  "footer-leading-blank": [1, "always"],
  "footer-max-line-length": [2, "always", 100],
  "header-max-length": [2, "always", 50],
  "scope-case": [2, "always", "lower-case"],
  "subject-case": [2, "never", ["sentence-case", "start-case", "pascal-case", "upper-case"]],
  "subject-empty": [2, "never"],
  "subject-full-stop": [2, "never", "."],
  "type-case": [2, "always", "lower-case"],
  "type-empty": [2, "never"],
  "type-enum": [
    2,
    "always",
    ["feat", "fix", "docs", "perf", "refactor", "build", "ci", "revert", "style", "test", "chore"]
  ]
}

commitlint.config.file

Path to a commitlint configuration file. Relative paths are resolved based on the workspace root. Leave blank to auto-detect.

commitlint.globalLibraryPath

Path to globally installed commitlint libraries, used if locally installed libraries cannot be found. Leave blank to auto-detect.

commitlint.globalNodePath

Path to globally installed node binary, used to load globally installed configurations. Leave blank to auto-detect.

commitlint.log.enabled

Whether to enable logging to the output panel.

commitlint.preferBundledLibraries

Whether to prefer using commitlint libraries bundled with the extension over locally or globally installed versions.

  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2022 Microsoft