Skip to content

Commit

Permalink
feat(dx): validate commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte committed Jul 9, 2017
1 parent cd2c00a commit 27f319e
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 4 deletions.
32 changes: 28 additions & 4 deletions package.json
Expand Up @@ -50,7 +50,8 @@
"minami": "^1.2.3",
"mustache": "^2.3.0",
"nock": "^9.0.13",
"prettier": "^1.5.2"
"prettier": "^1.5.2",
"validate-commit-msg": "^2.12.2"
},
"peerDependencies": {
"cucumber": "^2.3.1"
Expand All @@ -69,16 +70,39 @@
"doc-pub": "yarn run readme && yarn run doc && gh-pages -d _doc",
"examples": "cucumberjs --require examples/support examples/features",
"changelog": "git-changelog -t false -n v${npm_package_version}",
"precommit": "lint-staged"
"precommit": "lint-staged",
"commitmsg": "validate-commit-msg"
},
"lint-staged": {
"README.tpl.md": ["readme", "git add"],
"*.feature": ["examples"],
"README.tpl.md": [
"readme",
"git add"
],
"*.feature": [
"examples"
],
"*.js": [
"lint-fix",
"fmt",
"git add",
"jest --bail --findRelatedTests"
]
},
"config": {
"validate-commit-msg": {
"types": ["feat", "fix", "docs", "style", "refactor", "perf", "test", "build", "ci", "chore", "revert"],
"scope": {
"required": false,
"allowed": ["*"],
"validate": false,
"multiple": false
},
"warnOnFail": false,
"maxSubjectLength": 80,
"subjectPattern": ".+",
"subjectPatternErrorMsg": "subject does not match subject pattern!",
"helpMessage": "",
"autoFix": false
}
}
}
36 changes: 36 additions & 0 deletions yarn.lock
Expand Up @@ -556,6 +556,10 @@ colors@^1.1.0, colors@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"

colors@~0.6.0-1:
version "0.6.2"
resolved "https://registry.yarnpkg.com/colors/-/colors-0.6.2.tgz#2423fe6678ac0c5dae8852e5d0e5be08c997abcc"

combined-stream@^1.0.5, combined-stream@~1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009"
Expand All @@ -574,6 +578,10 @@ commander@^2.8.0, commander@^2.9.0:
dependencies:
graceful-readlink ">= 1.0.0"

commander@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.1.0.tgz#d121bbae860d9992a3d517ba96f56588e47c6781"

concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
Expand All @@ -590,6 +598,10 @@ content-type-parser@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/content-type-parser/-/content-type-parser-1.0.1.tgz#c3e56988c53c65127fb46d4032a3a900246fdc94"

conventional-commit-types@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/conventional-commit-types/-/conventional-commit-types-2.2.0.tgz#5db95739d6c212acbe7b6f656a11b940baa68946"

convert-source-map@^1.1.0, convert-source-map@^1.4.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5"
Expand Down Expand Up @@ -1059,6 +1071,10 @@ fill-range@^2.1.0:
repeat-element "^1.1.2"
repeat-string "^1.5.2"

find-parent-dir@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/find-parent-dir/-/find-parent-dir-0.3.0.tgz#33c44b429ab2b2f0646299c5f9f718f376ff8d54"

find-up@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f"
Expand All @@ -1072,6 +1088,13 @@ find-up@^2.1.0:
dependencies:
locate-path "^2.0.0"

findup@0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/findup/-/findup-0.1.5.tgz#8ad929a3393bac627957a7e5de4623b06b0e2ceb"
dependencies:
colors "~0.6.0-1"
commander "~2.1.0"

flat-cache@^1.2.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96"
Expand Down Expand Up @@ -2744,6 +2767,10 @@ sax@^1.2.1:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"

semver-regex@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9"

"semver@2 || 3 || 4 || 5", semver@^5.3.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
Expand Down Expand Up @@ -3142,6 +3169,15 @@ uuid@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04"

validate-commit-msg@^2.12.2:
version "2.12.2"
resolved "https://registry.yarnpkg.com/validate-commit-msg/-/validate-commit-msg-2.12.2.tgz#6d5015331bf196c22afb880d3f33bcef1deafea6"
dependencies:
conventional-commit-types "^2.0.0"
find-parent-dir "^0.3.0"
findup "0.1.5"
semver-regex "1.0.0"

validate-npm-package-license@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc"
Expand Down

0 comments on commit 27f319e

Please sign in to comment.