conventional-changelog-archived-repos / validate-commit-msg

DEPRECATED. Use https://github.com/marionebl/commitlint instead. githook to validate commit messages are up to standard
http://conventionalcommits.org/
MIT License
557 stars 100 forks source link

Default `.vcmrc` config file causes JSON parser error #89

Closed dherges closed 7 years ago

dherges commented 7 years ago

There is a default .vcmrc file shown in the readme.

Because the config file is JSON.parse()'d|, it causes an "Unexpected token ... in JSON" error. The error is caught and silently suppressed.

I think the .vcmrc should be dropped/renamed to vcm.json, thus making it clear that it's supposed to be a valid JSON file!

spirosikmd commented 7 years ago

Hi @dherges! Supporting vcm.json instead of .vcmrc would be a breaking change. Of course we could support both formats. But maybe README should be more clear that .vcmrc should be valid JSON. Also we should not suppress the error and show users a clear message. What do you think?

dherges commented 7 years ago

Ok. First, for this issue, the README should give a working example and a hint for rc file being valid JSON.

Second, I still think, that a JSON file should have a .json file ending. Maybe, it should support both .vcmrc and .vcm.json. This can be discussed in #90 as the cosmiconfig looks a good thing!

dherges commented 7 years ago

Shall we close this since #91 is merged? The other things can be discussed in #90. wdyt?

Garbee commented 7 years ago

SGTM.

FYI the term to auto-close should be Fixes {number} in the commit message instead of Solves {number} or other synonyms. I wish GH had more synonym checking but, alas it's fairly hard-coded to a few choices.