helpwave / web

The official web application of helpwave
https://staging-tasks.helpwave.de
Mozilla Public License 2.0
13 stars 4 forks source link

Add husky and commitlint #837

Open konstantinschuette opened 5 months ago

konstantinschuette commented 5 months ago

Describe the chore

Husky Commitlint

I'm used to run the linter for each commit, as you then can't commit something with ESLint errors. I know we have a pipeline that catches lint errors, but I think it makes more sense to catch them earlier if we can. At least I don't see the benefit of being able to create commits that violates ESLint.

With husky you can set up rules, that the linter has to pass in order to create a commit. That way you can also lint the commit message with commitlint. So then the commit messages are all prefixed the same way with chore/feat/fix

MaxSchaefer commented 5 months ago

We have already used husky, but we didn't like it

But we can run CommitLint in the CI