Commitlint
commitlint.js.org
commitlint
By supporting npm-installed configurations it makes sharing of commit conventions easy. ... Get high commit message quality and short feedback cycles by linting commit messages right when they are authored. ... To get the most out of commitlint you'll want to automate it in your project lifecycle.
npm
npmjs.com › package › commitlint
commitlint - npm
March 15, 2026 - Lint your commit messages. Latest version: 20.5.3, last published: 11 hours ago. Start using commitlint in your project by running `npm i commitlint`. There are 121 other projects in the npm registry using commitlint.
» npm install commitlint
Published Apr 30, 2026
Version 20.5.3
Videos
npm
npmjs.com › package › @commitlint › cli
@commitlint/cli - npm
3 weeks ago - Lint your commit messages. Latest version: 21.0.1, last published: a day ago. Start using @commitlint/cli in your project by running `npm i @commitlint/cli`. There are 1174 other projects in the npm registry using @commitlint/cli.
» npm install @commitlint/cli
Published May 12, 2026
Version 21.0.1
GitHub
github.com › conventional-changelog › commitlint
GitHub - conventional-changelog/commitlint: 📓 Lint commit messages
If your project does not contain ... add rules to your commitlint.config.js error message. This can be fixed by doing either of the following: Add a package.json file, declaring your project as an ES6 module. This can be done easily by running npm init es6....
Starred by 18.5K users
Forked by 965 users
Languages TypeScript 92.1% | JavaScript 7.9%
npm
npmjs.com › package › @commitlint › config-conventional
@commitlint/config-conventional - npm
2 weeks ago - Shareable commitlint config enforcing conventional commits. Use with @commitlint/cli and @commitlint/prompt-cli. npm install --save-dev @commitlint/config-conventional @commitlint/cli echo "export default {extends: ['@commitlint/config-conventional']};" > commitlint.config.js
» npm install @commitlint/config-conventional
Published May 08, 2026
Version 21.0.0
Commitlint
commitlint.js.org › guides › getting-started.html
Getting started | commitlint
If your project does not contain ... add rules to your commitlint.config.js error message. This can be fixed by doing either of the following: Add a package.json file, declaring your project as an ES6 module. This can be done easily by running npm init es6....
Commitlint
commitlint.js.org › guides › local-setup.html
Guide: Local setup | commitlint
To use commitlint you need to setup commit-msg hook (currently pre-commit hook is not supported) To lint commits before they are created you can use Husky's commit-msg hook. You can find complete setup instructions on the official documentation. ... The following instructions are meant to husky@v9 if you are using a different version consult the official documentation of your version. ... npm install --save-dev husky # husky@v9 npx husky init # husky@v8 or lower npx husky install # Add commit message linting to commit-msg hook echo "npx --no -- commitlint --edit \$1" > .husky/commit-msg
Commitlint
commitlint.js.org › reference › configuration.html
Configuration | commitlint
Every commitlint configuration can extend other commitlint configurations. Specify configurations to extend via the .extends key, using ids that can be resolved by the node resolve algorithm. This means installed npm packages and local files can be used.
Top answer 1 of 3
9
It seems like there was an issue running npx husky add .husky/commit-msg 'npx --no-install commitlint --edit $1' because the command part was more than one word. A workaround I found was to split it up into two parts.
1 - Call npx husky add .husky/commit-msg
This created an empty/ default file in the right place with the following content:
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
undefined
2 - Then I just replaced undefined with npx --no-install commitlint --edit $1 and it works
This part of the commitlint docs helped me understand that doing it that way was okay
Hope this helps anyone else who encounters the same issue!
2 of 3
0
You are using Windows. So, try this (it worked for me)
npx husky add .husky/commit-msg "npx --no-install commitlint --edit "$1""
with double quotes instead. Note that $1 also needs double quotes.
Commitlint
commitlint.js.org › guides › ci-setup.html
Guide: CI Setup | commitlint
name: CI on: [push, pull_request] permissions: contents: read jobs: commitlint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Setup node uses: actions/setup-node@v4 with: node-version: lts/* cache: npm - name: Install commitlint run: npm install -D @commitlint/cli @commitlint/config-conventional - name: Print versions run: | git --version node --version npm --version npx commitlint --version - name: Validate current commit (last commit) with commitlint if: github.event_name == 'push' run: npx commitlint --last --verbose - name: Validate PR commits with commitlint if: github.event_name == 'pull_request' run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
npm
npmjs.com › @commitlint › prompt-cli
@commitlint/prompt-cli - npm
March 15, 2026 - commit prompt using commitlint.config.js. Latest version: 20.5.0, last published: 25 days ago. Start using @commitlint/prompt-cli in your project by running `npm i @commitlint/prompt-cli`. There are 23 other projects in the npm registry using @commitlint/prompt-cli.
» npm install @commitlint/prompt-cli
Published Mar 15, 2026
Version 20.5.0
npm
npmjs.com › @commitlint › cz-commitlint
@commitlint/cz-commitlint - npm
3 weeks ago - # Install commitlint cli and conventional config npm install --save-dev @commitlint/config-conventional @commitlint/cli # or yarn yarn add @commitlint/config-conventional @commitlint/cli -D # Simple: config with conventional echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js
» npm install @commitlint/cz-commitlint
Published Apr 30, 2026
Version 20.5.3
Medium
trishan9.medium.com › what-is-commitlint-why-to-use-how-to-setup-and-more-2832d50ccff3
What is Commitlint? Why to use? How to Setup and more | by Trishan Wagle | Medium
September 8, 2023 - How to setup Commitlint in your project: Step 1: Install Commitlint ``` # Install and configure if needed npm install — save-dev @commitlint/{cli,config-conventional} # For Windows: npm install — save-dev @commitlint/config-conventional @commitlint/cli # Configure commitlint to use conventional config echo “module.exports = { extends: [‘@commitlint/config-conventional’] };” > commitlint.config.js ```
npm
npmjs.com › package › @commitlint › lint
@commitlint/lint - npm
May 8, 2025 - Lint a string against commitlint rules. Latest version: 20.4.3, last published: 2 days ago. Start using @commitlint/lint in your project by running `npm i @commitlint/lint`. There are 98 other projects in the npm registry using @commitlint/lint.
» npm install @commitlint/lint
npm
npmjs.com › package › @commitlint › config-angular
@commitlint/config-angular - npm
March 15, 2026 - Shareable commitlint config enforcing the Angular commit convention. Use with @commitlint/cli and @commitlint/prompt-cli. npm install --save-dev @commitlint/config-angular @commitlint/cli echo "export default {extends: ['@commitlint/config-angular']};" > commitlint.config.js
» npm install @commitlint/config-angular
Published Mar 15, 2026
Version 20.5.0
Npm
npm.io › package › @commitlint › cli
@commitlint/cli NPM | npm.io
xcc-commitlint@adbayb/scripts@atmosfera/commitlint-config@tractorzoom/commitlint-config@uukit/scriptsftdr-contractor-portalzfzn-uilib-doc-components@jsdrome/commitlint@jsdrome/commitlint-config-jsdrome@cangir/gatsby-themessv-component-librarysv-component-library-1sv-component-library-2iamnewton-commitlint-config@holomodules/core-build-tools@azimutlabs/config-git@droplt/corecommitlint-config-sreeramiron-lintgears-shared-tools@wildberries/boilerplate-configuration-files@dlwlrma/ngx-linter-formatterjojo-design@fengshangwuqi/dev-deps@dnb-hugo/commitlint-config@spothero/commitlint-configeslint-conf
Npm
npm.io › package › @commitlint › rules
@commitlint/rules NPM | npm.io
Primary way to interact with commitlint.
Npm
npm.io › package › @commitlint › types
@commitlint/types NPM | npm.io
Check @commitlint/types 19.8.1 package - Last release 19.8.1 with MIT licence at our NPM packages aggregator and search engine.