Questions tagged [commitlint]
16 questions
3
votes
0 answers
Commitlint - Types for '.commitlintrc.js'
In the .commitlintrc.js file, I wanted to type the exported configuration option, so that my IDE could suggest possible options.
/** @type {import('@commitlint/types').UserConfig} */
module.exports = {
extends:…

andreivictor
- 7,628
- 3
- 48
- 75
3
votes
1 answer
What should be the first commit message using commitlint?
If I am using @commitlint/config-conventional, what should be my first commit message using commmitlint? Is it feat: first commit or a build: first commit or a chore: first commit?

PirateApp
- 5,433
- 4
- 57
- 90
3
votes
1 answer
Customise commitlint header format
I am using Husky to set my git hooks, and am trying to change to default format of the header expected by Commitlint:
type(scope?): subject
I am specifically trying to have this formatting:
:gitmoji:? [scope] subject
With :gitmoji: one of…

Thanh-Quy Nguyen
- 2,995
- 7
- 30
- 46
1
vote
0 answers
@commitlint/prompt-cli configuration not working
I'm trying to configure my commitlint prompt to show a list for type selection.
This is my config file (commitlint.config.js):
module.exports = {
extends: ['@commitlint/config-conventional'],
prompt: {
questions: {
type:…

Diego Garcia
- 11
- 1
1
vote
1 answer
How to ignore the subject-case in commitlint?
I am trying to ignore the case in commitlint, but unfortunately there is not enough documentation how to ignore a specific rule.
I tried to add and allow all cases always in the subject-case rule, but this won't allow mixed sentences like…

Hugo B.
- 471
- 1
- 8
- 23
1
vote
1 answer
How to use commitlint to only allow commits from one email
I have several Github accounts and some of them are for open source repos and I use ssh keys for all of them. I'm constantly swapping workplaces and each time I need to be careful to set git config user.name and git config user.email correctly
We're…

Juan Ramos
- 21
- 1
1
vote
0 answers
How use commitlint only for subject-case setentence case and body-full-stop never
I am trying to use commitlint without using extends: ['@commitlint/config-conventional'],:
module.exports = {
rules: {
'subject-case': [2, 'always', 'sentence-case'],
'type-empty': [2, 'always'],
'body-full-stop': [2, 'never', '.'],
…

iserdmi
- 75
- 1
- 11
1
vote
2 answers
Commitlint not working. git commit -m commitlint message showing unknown argument , husky existed with code 1 (error)
git commit -m "feat: testing the commitlint library"
@commitlint/cli@16.2.3 - Lint your commit messages
[input] reads from stdin if --edit, --env, --from and --to are omitted
Options:
-c, --color toggle colored output [boolean]…

AWE FRANCIS OLAWUMI
- 154
- 1
- 9
1
vote
0 answers
How to fix commitlint error404?
I'm trying to configure my app and it's my first time installing commitlint + husky. Commitlint was working fine untill I installed Husky. Now i'm stuck with this error when i'm trying to commit -m to my repository.
npm ERR! code E404
npm ERR! 404…

xFlame
- 115
- 2
- 9
0
votes
0 answers
commitlint all commits in GitLAB
We are using a self-hosted instance of GitLab and we have central pipeline templates that our Dev teams use in their .gitlab-ci file via includes.
I'm looking to implement commitlint in our shared pipeline templates. I've been able to setup a job…

JScott
- 73
- 2
- 9
0
votes
1 answer
Customize commitlint with conventional commit + JIRA Ticket
I am using commit lint and I want to use conventional commits but i want to include a Jira Ticket.
Example TEST-23: fix: my body

J. Langer
- 262
- 3
- 17
0
votes
0 answers
Issue with CommitLint: "Please add rules to your `commitlint.config.js`" error despite having rules in my configuration file
I am implementing a commit linting hook for a team project. I successfully installed Husky and moved on to configuring my CommitLint. Wanting to use the basic conventional commits convention, I installed the following packages. Here is my…

len4o17
- 3
- 1
0
votes
1 answer
I am implementing commitlint in an Azure CI pipeline but cannot get the reference to another branch with the --from tag to work
I am working with a yaml file in my .net core project in Azure DevOps which looks like this:
trigger:
- main
pool:
vmImage: windows-latest
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
stages:
-…

Steverino541
- 1
- 2
0
votes
0 answers
Rolling back to previous version of npm package doesn't work?
(This question revolves more around npm and how dependencies and versions work in this ecosystem; commitlint is just an example of the issue at hand, but I imagine it could happen with any npm package.)
I was using commitlint npm package happily for…

knocte
- 16,941
- 11
- 79
- 125
0
votes
1 answer
Can't run commitlint in husky with another custom command
How can I have two precommit hooks in husky? I'm looking to use commitlint along side a custom script defined in my package.json. I have installed husky and have a pre-commit script in the .husky folder. Here is what I've tried:
#!/usr/bin/env sh
.…

afriedman111
- 1,925
- 4
- 25
- 42