diff --git a/config/speedy-commit-msg.json b/config/speedy-commit-msg.json index b03e3f6..3f2c2fe 100644 --- a/config/speedy-commit-msg.json +++ b/config/speedy-commit-msg.json @@ -1,11 +1,10 @@ { "rules": { "message": { - "noUnscoped": false, - "maxLength": 75 + "max-length": 75 }, "type": { - "validTypes": [ + "valid-types": [ "amend", "feat", "fix", @@ -19,14 +18,12 @@ ] }, "scope": { - "noSpace": false, - "noDash": true, - "noUnderscore": true + "no-dash": true, + "no-underscore": true }, "subject": { - "noPeriodAtEnd": true, - "noUpperFirst": true, - "noLowerFirst": false + "no-period-at-end": true, + "no-upper-first": true } } } \ No newline at end of file diff --git a/src/validator/validator.spec.ts b/src/validator/validator.spec.ts index 33e9f62..5931209 100644 --- a/src/validator/validator.spec.ts +++ b/src/validator/validator.spec.ts @@ -7,16 +7,16 @@ describe("validateSpec", () => { const CONFIG: config.ConfigData = { "rules": { "message": { - "noUnscoped": false + "no-unscoped": false }, "type": { - "validTypes": [ + "valid-types": [ "chore", "feat" ] }, "scope": { - "noDash": true + "no-dash": true } } }; diff --git a/src/validator/validator.ts b/src/validator/validator.ts index a9b3474..abc0385 100644 --- a/src/validator/validator.ts +++ b/src/validator/validator.ts @@ -45,7 +45,7 @@ export namespace Validator { return; } - const result = (_.get(Rules, key) as Function) + const result = (_.get(Rules, _.camelCase(key)) as Function) .call(null, text, messagePart, value) as RulesResult; if (result.failed) {