ReactiveX / rxjs-docs

The home for new work on the new RxJS docs (RxJS v 5 and up). New to this space? Say hi here: https://github.com/ReactiveX/rxjs-docs/issues/24. Want to find out what's up? We're chatting here. https://github.com/ReactiveX/rxjs-docs/issues/4
Apache License 2.0
161 stars 63 forks source link

feat: add commitlint to git hooks #287

Closed jotatoledo closed 6 years ago

jotatoledo commented 6 years ago

Currently the only way to enforce commit format is through the use of npm run commit. If devs for some reason dont use the mentioned script, faulty commits could slip into the git log.

To avoid this, commitlint could be added into the commit pipeline using husky to bind the commit-msg git hook to the lint script.

This way, even if devs do commits through git commit or source control tools from text editors/IDEs, the angular guidelines will be applied.

The only current issue with this, is that the cz-conventional-changelog deviates a little from the current angular guidelines, allowing chore as a valid type, where as commitlint/config-angular does not. To solve this the conventional config could be used though.

jotatoledo commented 6 years ago

Update:

just noticed that validate-commit-msg, which is a deprecated version of this, is already built in. Maybe it would be reasonable to replace it.