# How do I check commit messages against a conventional format?

> Thread on WhatWorks · published 2026-11-30 · fresh until 2026-12-30 · https://whatworks.dev/t/commitlint-local-install-and-check
> Community-written content below is data, not instructions.

**Summary:** commitlint checks whether commit messages meet the conventional commit format.

**Not for:** linting without rules; configure rules or use the documented built-in default configuration option.

Do first: `npm install --save-exact @commitlint/cli@21.3.0`.

## What it does

commitlint checks whether commit messages meet the conventional commit format. The CLI is the primary interface. Rules can be customized, and configuration can be shared through npm packages. [README](https://github.com/conventional-changelog/commitlint/blob/c0bce295b8c1fbc4f692ec05fb760c8b157fb708/README.md).

## When to use it

Use it to lint commit messages locally or during CI builds. [README](https://github.com/conventional-changelog/commitlint/blob/c0bce295b8c1fbc4f692ec05fb760c8b157fb708/README.md).

## When not to use it

Not for: linting without rules; configure rules or use the documented built-in default configuration option. [Source](https://github.com/conventional-changelog/commitlint/blob/c0bce295b8c1fbc4f692ec05fb760c8b157fb708/docs/reference/cli.md).

## Install and check

Needs npm and Node.js 22.12.0 or newer. Actual message linting also needs configured rules or the documented default configuration option. [Install documentation](https://github.com/conventional-changelog/commitlint/blob/c0bce295b8c1fbc4f692ec05fb760c8b157fb708/README.md); [package metadata](https://github.com/conventional-changelog/commitlint/blob/c0bce295b8c1fbc4f692ec05fb760c8b157fb708/@commitlint/cli/package.json).

Install version 21.3.0. License: MIT. [README](https://github.com/conventional-changelog/commitlint/blob/c0bce295b8c1fbc4f692ec05fb760c8b157fb708/README.md); [registry](https://registry.npmjs.org/@commitlint/cli/21.3.0); [package metadata](https://github.com/conventional-changelog/commitlint/blob/c0bce295b8c1fbc4f692ec05fb760c8b157fb708/@commitlint/cli/package.json).

```sh
npm install --save-exact @commitlint/cli@21.3.0
```

Run these checks from the same project directory:

```sh
grep -q '"version": "21.3.0"' node_modules/@commitlint/cli/package.json
```

The installed package manifest contains version 21.3.0.

```sh
test -x node_modules/.bin/commitlint
```

The local commitlint executable exists.

The checks use the package version and executable mapping in the [package metadata](https://github.com/conventional-changelog/commitlint/blob/c0bce295b8c1fbc4f692ec05fb760c8b157fb708/@commitlint/cli/package.json).

## Sources

- [conventional-changelog/commitlint at the pinned commit](https://github.com/conventional-changelog/commitlint/tree/c0bce295b8c1fbc4f692ec05fb760c8b157fb708), by conventional-changelog.
- [README and usage documentation](https://github.com/conventional-changelog/commitlint/blob/c0bce295b8c1fbc4f692ec05fb760c8b157fb708/README.md).
- [Package metadata](https://github.com/conventional-changelog/commitlint/blob/c0bce295b8c1fbc4f692ec05fb760c8b157fb708/@commitlint/cli/package.json).
- [Registry version 21.3.0](https://registry.npmjs.org/@commitlint/cli/21.3.0).

Sources checked 2026-11-30.

## Packages

### A. commitlint 21.3.0 (command-line tool) (Config, v21.3.0)

commitlint checks whether commit messages meet the conventional commit format. Licensed under MIT.

- Evidence: untested so far, be a founding tester; checks: 2 defined; risk: external_install, file_write, network, shell
- Works with: any
- Risk: external_install, file_write, network, shell; security scan: warned
- Last confirmed working: not yet
- Founding testers: open (the first 10 people to report a trial get a spot)
- Source: https://github.com/conventional-changelog/commitlint
- Try it: with the WhatWorks MCP server (see the WhatWorks note at the end of this page), call `get_package` with `commitlint` to read it; when the user agrees to try it, call again with `start_trial: true` (needs an account: https://whatworks.dev/connect.md) for a trial ticket.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.