conventional-changelog / conventional-changelog/commitlint

fix: subject-case value set to lower-case but input is not properly formatted (prompt-cli)

Open
#3,570 5 comments 1 reaction 0 assignees View on GitHub
bug help wanted
Dominant language
TypeScript
Stars
18.7k
Forks
970
Avg merge
7h 33m
Merged PRs (30d)
49

Description

### Expected Behavior

Setting `subject-case` value to `lower-case` should properly format all text to lower-case. If it moves onto the next step without properly formatting, an error should properly display.

### Current Behavior

1. When I type my subject message in all uppercase, the cli shows it being lower-cased, but when I go to the next step, the subject still displays as all upper-case
2. There is no error that pops up that my text is not lower-case

![commitlint_cli](https://user-images.githubusercontent.com/42705941/227668538-fef90202-eca4-4cae-a30d-432a34f2b001.png)

### Affected packages

- [X] cli
- [ ] core
- [ ] prompt
- [ ] config-angular

### Possible Solution

_No response_

### Steps to Reproduce

```bash
1. Set subject-case rule in `commitlint.config.js`

module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'subject-case': [2, 'always', 'lower-case'],
},
};

2. When committing, I type HELLO WORLD as my subject and move to the next stage (body), no error prompt appears that my text is not lower-case. The commit message is currently generated as `fix: HELLO WORLD` instead of `fix: hello world`
```

### Context

_No response_

### commitlint --version

@commitlint/cli: ^17.4.2

### git --version

v2.25.1

### node --version

v16.14.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.