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
» npm install @commitlint/config-conventional
Issue with CommitLint: "Please add rules to your `commitlint.config.js`" error despite having rules in my configuration file
Automating Releases in GitHub with Conventional Commits
Commit message linting within Magit?
How to enforce git commit messages longer than stupid shit like "abc" and "fix"?
Videos
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
This is my dependency package
"devDependencies": {
"@commitlint/cli": "^19.7.1",
"@commitlint/config-conventional": "^19.7.1",
"@types/node": "18.18.13",
"commitizen": "^4.3.1",
"cz-conventional-changelog": "^3.3.0",
"husky": "^9.1.7"
}
You can try changing the file name of commitilint.config. js to commitilint.config. cjs
// commitlint.config.cjs
module.exports = {
extends: ['@commitlint/config-conventional']
}
Please also note that the file encoding is utf-8
» npm install @open-turo/commitlint-config-conventional