I had the same issue and was able to overcome it by adding this section to my package.json, which configures commitlint to use config-conventional.

"commitlint": {
  "extends": [
    "@commitlint/config-conventional"
  ]
},

Also ensure that you installed both dev dependencies.

"@commitlint/cli": "18.0.0",
"@commitlint/config-conventional": "18.0.0",

You can find this also in the commitlint projects package.json. ;- ) https://github.com/conventional-changelog/commitlint/blob/master/package.json

Answer from lars on Stack Overflow
🌐
Commitlint
commitlint.js.org › reference › configuration.html
Configuration | commitlint
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. ... export default { extends: [ 'lerna' // prefixed with commitlint-config-*, '@commitlint/config-conventional' // scoped packages are not prefixed ] }
🌐
GitHub
github.com › conventional-changelog › commitlint › tree › master › @commitlint › config-conventional
commitlint/@commitlint/config-conventional at master · conventional-changelog/commitlint
npm install --save-dev @commitlint/config-conventional @commitlint/cli echo "export default {extends: ['@commitlint/config-conventional']};" > commitlint.config.js
Author   conventional-changelog
🌐
npm
npmjs.com › package › @commitlint › config-conventional
commitlint/config-conventional
March 15, 2026 - Shareable commitlint config enforcing conventional commits. Latest version: 20.5.0, last published: a month ago. Start using @commitlint/config-conventional in your project by running `npm i @commitlint/config-conventional`. There are 1374 other projects in the npm registry using @commitlint/config-conventional.
      » npm install @commitlint/config-conventional
    
Published   Mar 15, 2026
Version   20.5.0
🌐
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.
🌐
GitHub
github.com › conventional-changelog › commitlint
GitHub - conventional-changelog/commitlint: 📓 Lint commit messages
Node v24 changes the way that modules are loaded, and this includes the commitlint config file. If your project does not contain a package.json, commitlint may fail to load the config, resulting in a Please add rules to your commitlint.config.js error message.
Starred by 18.5K users
Forked by 965 users
Languages   TypeScript 92.2% | JavaScript 7.8%
🌐
Commitlint
commitlint.js.org › guides › getting-started.html
Getting started | commitlint
Install @commitlint/cli and a @commitlint/config-* / commitlint-config-* of your choice as devDependency and configure commitlint to use it.
🌐
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 ```
🌐
Commitlint
commitlint.js.org › guides › ci-setup.html
Guide: CI Setup | commitlint
Follow the Getting Started for basic installation and configuration instructions. An example of how a GitHub Actions workflow could validate the last commit message or all commit messages inside a Pull Request: ... 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 nod
Find elsewhere
🌐
Commitlint
commitlint.js.org › concepts › shareable-config.html
Concept: Shareable configuration | commitlint
You can also load local configuration by using a relative path to the file. ... This must always start with a . (dot). ... When using scoped packages you have two options. You can provide the full path of the package like: ... export default { extends: ["@commitlint/config-conventional"], // => @commitlint/config-conventional };
🌐
Theodorus Clarence
theodorusclarence.com › shorts › husky-commitlint-prettier
Husky, Commitlint, and Prettier Configuration | theodorusclarence.com
yarn add -D @commitlint/config-conventional @commitlint/cli · Then, create a new file in the husky folder · .husky/commit-msg · npx --no-install commitlint --edit "$1" Create commitlint.config.js, you don't need to override the rules if you don't want to ·
🌐
npm
npmjs.com › package › @commitlint › config-angular
commitlint/config-angular
March 15, 2026 - Shareable commitlint config enforcing the angular commit convention. Latest version: 20.5.0, last published: a month ago. Start using @commitlint/config-angular in your project by running `npm i @commitlint/config-angular`. There are 57 other projects in the npm registry using @commitlint/...
      » npm install @commitlint/config-angular
    
Published   Mar 15, 2026
Version   20.5.0
🌐
npm
npmjs.com › package › commitlint-config-cz
commitlint-config-cz - npm
December 20, 2021 - Gets the commitlint config from a path to config file.
      » npm install commitlint-config-cz
    
Published   Dec 20, 2021
Version   0.13.3
Author   Whizark
🌐
freeCodeCamp
freecodecamp.org › news › how-to-use-commitlint-to-write-good-commit-messages
How to Write Good Commit Messages with Commitlint
November 12, 2021 - npm install @commitlint/cli @commitlint/config-conventional --save-dev # OR yarn add -D @commitlint/cli @commitlint/config-conventional
🌐
Commitlint
commitlint.js.org › reference › rules-configuration.html
Rules configuration | commitlint
Rule configurations are either of type array residing on a key with the rule's name as key on the rules object or of type function returning type array or Promise<array>. This means all of the following notations are supported. commitlint.config.js · js · export default { // ...
🌐
Commitlint
keisukeyamashita.github.io › commitlint-rs › config › configuration
Configuration | Commitlint
Note that it is searched in the order written above and the first one found is loaded. Therefore, if you have .commitlintrc and .commitlintrc.yml in the same directory, the .commitlintrc will be loaded and the second one will be ignored. Configuration file can be specified by using the --config ...
🌐
Snyk
snyk.io › advisor › @commitlint/config-conventional › @commitlint/config-conventional code examples
commitlint/config-conventional Code Examples
const commitTypes = require('commit-types-peakfijn'); const config = require('@commitlint/config-conventional'); config.rules['header-max-length'] = [2, 'always', 80]; config.rules['scope-empty'] = [2, 'always']; config.rules['subject-min-length'] = [2, 'always', 15]; config.rules['type-enum'] = [2, 'always', Object.keys(commitTypes)]; module.exports = config; Shareable commitlint config enforcing conventional commits