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

confusing option scope.validate #83

Closed stevemao closed 6 years ago

stevemao commented 7 years ago

if you set

"config": {
    "validate-commit-msg": {
      "scope": {
        "required": true
      }
    }
  },

It doesn't actually validate scope. Unless you specify scope.validate to be true as well. So what's the point of scope.validate? It doesn't do anything except enabling other scope options.

Garbee commented 7 years ago

scope.validate enables the validation. scope.required means a scope is required to be provided in commit messages.

stevemao commented 7 years ago

Yeah but when I specify other scope options I already mean to validate it. If not I just turn off all scope options.

Garbee commented 7 years ago

ah yea, I see what you mean. hmm... Let me look into fixing that and remove the validate boolean.

Garbee commented 7 years ago

So, after doing the tweak to remove the option and looking through the tests to fix up. I feel like it is a backwards incompatible change to handle this in 2.x.

I would like to address this though, perhaps along with an ES6 rewrite that has been discussed as well to clean stuff up a bit.

kentcdodds commented 7 years ago

Might not be a bad idea to do an entire re-write. It's not a huge module after all. Also there's talk in #84 about making some big changes as well I think.

hutson commented 6 years ago

This package has been deprecated. Please use https://github.com/marionebl/commitlint instead.