conventional-changelog / commitlint

📓 Lint commit messages
https://commitlint.js.org
MIT License
16.94k stars 912 forks source link

fix: commitlint is not working #4085

Closed jefersoneiji closed 6 months ago

jefersoneiji commented 6 months ago

Steps to Reproduce

  1. First step: Access the getting started section from commitlint

  2. Second step: Follow all the installation/setup steps

Current Behavior

Commitlint apparently doesn't even run when commit-msg is called

Expected Behavior

To throw errors or warning whenever something is wrong.

Affected packages

Possible Solution

No response

Context

I installed it in a vite + react.js project

commitlint --version

"@commitlint/cli": "^19.3.0",

git --version

2.32.0.windows.1

node --version

20.11.1

escapedcat commented 6 months ago

Can the docs be improved somehow?

jefersoneiji commented 6 months ago

Can the docs be improved somehow?

Yes. I'm a windows user. MacOS and Windows encoding for files tend to be different. After taking a look my encoding was UTF-16 LE. Switching it back to UTF-8 solved the problem. I had to manually rewrite the husky commit-msg file. My code editor is VSCode by the way.

escapedcat commented 6 months ago

Ah yes, here's the issue: #788
Happy for a PR to the docs :)

jefersoneiji commented 6 months ago

Waiting for you to merge it https://github.com/conventional-changelog/commitlint/pull/4086