commitlint-azure-pipelines-cli

raw JSON →
1.0.5 verified Fri May 01 auth: no javascript

CLI tool to lint commits in Azure Pipelines using commitlint. Current stable version is 1.0.5 (last updated December 2022, sporadically maintained). Requires @commitlint/cli >=7.0.0 as a peer dependency. Key differentiator: zero configuration needed for Azure Pipelines CI — automatically detects the correct commit range for pull requests and branches, simplifying setup compared to manually specifying commit ranges with commitlint directly.

error Error: config is not valid JSON: /home/vsts/work/1/s/.commitlintrc.json
cause commitlint configuration file is malformed or missing.
fix
Create a valid .commitlintrc.json (or .commitlintrc.js) at the repository root. Example: { "extends": ["@commitlint/config-conventional"] }
error /usr/local/bin/commitlint-azure-pipelines: line 1: ./node_modules/.bin/commitlint: No such file or directory
cause commitlint is not installed (missing peer dependency).
fix
Run npm install --save-dev @commitlint/cli to install commitlint.
error Cannot find module '@commitlint/format'
cause Missing commitlint dependency or incorrect version.
fix
Install the full commitlint package: npm install --save-dev @commitlint/cli @commitlint/core
gotcha Requires @commitlint/cli >=7.0.0 as a peer dependency; commitlint older than 7 will not work.
fix Ensure @commitlint/cli is installed and meets the minimum version: npm install @commitlint/cli@latest
gotcha The CLI binary must be run from the project root directory (where node_modules/.bin is accessible). Running from subdirectories will fail.
fix Run the script from the repository root or use a full path.
gotcha Only tested against Node.js 10.x and up; may fail on older versions.
fix Upgrade Node.js to version 10 or higher.
npm install commitlint-azure-pipelines-cli
yarn add commitlint-azure-pipelines-cli
pnpm add commitlint-azure-pipelines-cli

Installs and runs commitlint for Azure Pipelines with zero config. Detects commit range based on PR or branch.

# Install dependencies
npm install --save-dev @commitlint/cli commitlint-azure-pipelines-cli

# Add to azure-pipelines.yml:
# steps:
#   - script: ./node_modules/.bin/commitlint-azure-pipelines