Error when used with Husky: "Please add rules to your commitlint.config.js"
See original GitHub issueExpected Behavior
The following Husky hook used to work perfectly with “@commitlint/cli”: “^7.2.1” and “husky”: “^1.2.1”
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
Current Behavior
Today I started getting the following error:
Please add rules to your commitlint.config.js
I have never needed this file before!
Affected packages
- cli
- core
- prompt
- config-angular
Possible Solution
I added the commitlint.config.js file to fix the problem, but it seems mysterious how this started appearing suddenly.
Note: I do not understand how HUSKY_GIT_PARAMS works. The husky documents do not quite explain it.
Steps to Reproduce (for bugs)
You can see my fixed project here: https://github.com/archfirst/joinjs. The previous commit did not work.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Am unable to "Git Commit" my project onto my Github
... add a commitlint.config.js to the base of your project as the error message ... Apparently you commit message do not meet requirements....
Read more >Setting up commitlint and husky with a new project
The following error showed, Please add rules to your commitlint.config.js. Add the following to commitlint.config.js, which will extend the ...
Read more >commitlint - Lint commit messages
commitlint helps your team adhere to a commit convention. By supporting npm-installed configurations it makes sharing of commit conventions easy.
Read more >How to lint Git commit messages - Husky - remarkablemark
This command installs both @commitlint/cli and @commitlint/config-conventional . config-conventional is a standard based on the Angular ...
Read more >Set up ESLint, Prettier, Commitizen, Husky and friends in 2022
Next, we add a commitlint.config.js file to the root of our project. This works in a similar way to an ESLint config. We...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @escapedcat, were these versions…
Thanks for clarifying @marionebl. It makes total sense 👍