Skip to content
This repository was archived by the owner on Dec 1, 2018. It is now read-only.

Commit b95a213

Browse files
committed
chore(commit): Add commitlint
Use commitlint to enforce commit message format
1 parent 43a79fa commit b95a213

File tree

3 files changed

+119
-6
lines changed

3 files changed

+119
-6
lines changed

commitlint.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'use strict';
2+
3+
module.exports = {
4+
extends: ['@commitlint/config-angular'],
5+
};

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"node": ">=6.0.0"
1515
},
1616
"scripts": {
17-
"commit": "git-cz",
17+
"cm": "git-cz",
18+
"commitmsg": "commitlint -e",
1819
"precommit": "lint-staged",
1920
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
2021
},
@@ -26,10 +27,12 @@
2627
},
2728
"config": {
2829
"commitizen": {
29-
"path": "node_modules/cz-conventional-changelog"
30+
"path": "cz-conventional-changelog"
3031
}
3132
},
3233
"devDependencies": {
34+
"@commitlint/cli": "3.2.0",
35+
"@commitlint/config-angular": "3.1.1",
3336
"commitizen": "2.9.6",
3437
"cz-conventional-changelog": "2.0.0",
3538
"husky": "0.14.3",

yarn.lock

Lines changed: 109 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,41 @@
22
# yarn lockfile v1
33

44

5+
"@commitlint/[email protected]":
6+
version "3.2.0"
7+
resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-3.2.0.tgz#be8902f2fa859f93697a4e204305d6b476480931"
8+
dependencies:
9+
"@commitlint/core" "^3.2.0"
10+
babel-polyfill "^6.23.0"
11+
chalk "^2.0.1"
12+
get-stdin "^5.0.1"
13+
lodash "^4.17.4"
14+
meow "^3.7.0"
15+
16+
"@commitlint/[email protected]":
17+
version "3.1.1"
18+
resolved "https://registry.yarnpkg.com/@commitlint/config-angular/-/config-angular-3.1.1.tgz#55f2283803c6a4e01e755d0912eff9d757353366"
19+
20+
"@commitlint/core@^3.2.0":
21+
version "3.2.0"
22+
resolved "https://registry.yarnpkg.com/@commitlint/core/-/core-3.2.0.tgz#31753e772d094b72ca98a5f058fe5615e54c79a7"
23+
dependencies:
24+
babel-runtime "^6.23.0"
25+
chalk "^2.0.1"
26+
conventional-changelog-angular "^1.3.3"
27+
conventional-commits-parser "^1.3.0"
28+
find-up "^2.1.0"
29+
franc "^2.0.0"
30+
git-raw-commits "^1.1.2"
31+
import-from "^2.1.0"
32+
lodash "^4.17.4"
33+
mz "^2.6.0"
34+
path-exists "^3.0.0"
35+
pos "^0.4.2"
36+
rc "^1.1.7"
37+
resolve-from "^3.0.0"
38+
semver "^5.3.0"
39+
540
"@semantic-release/commit-analyzer@^2.0.0":
641
version "2.0.0"
742
resolved "https://registry.yarnpkg.com/@semantic-release/commit-analyzer/-/commit-analyzer-2.0.0.tgz#924d1e2c30167c6a472bed9f66ee8f8e077489b2"
@@ -196,6 +231,10 @@ ansi@^0.3.0, ansi@~0.3.0:
196231
version "0.3.1"
197232
resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21"
198233

234+
any-promise@^1.0.0:
235+
version "1.3.0"
236+
resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
237+
199238
anymatch@^1.3.0:
200239
version "1.3.2"
201240
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a"
@@ -785,7 +824,7 @@ babel-plugin-transform-strict-mode@^6.24.1:
785824
babel-runtime "^6.22.0"
786825
babel-types "^6.24.1"
787826

788-
[email protected], babel-polyfill@^6.16.0:
827+
[email protected], babel-polyfill@^6.16.0, babel-polyfill@^6.23.0:
789828
version "6.26.0"
790829
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.26.0.tgz#379937abc67d7895970adc621f284cd966cf2153"
791830
dependencies:
@@ -840,7 +879,7 @@ babel-register@^6.26.0:
840879
mkdirp "^0.5.1"
841880
source-map-support "^0.4.15"
842881

843-
[email protected], babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
882+
[email protected], babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0:
844883
version "6.26.0"
845884
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
846885
dependencies:
@@ -1426,7 +1465,7 @@ content-type@~1.0.2:
14261465
version "1.0.4"
14271466
resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
14281467

1429-
conventional-changelog-angular@^1.3.4:
1468+
conventional-changelog-angular@^1.3.3, conventional-changelog-angular@^1.3.4:
14301469
version "1.5.0"
14311470
resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-1.5.0.tgz#50b2d45008448455fdf67e06ea01972fbd08182a"
14321471
dependencies:
@@ -1551,6 +1590,18 @@ conventional-commits-filter@^1.0.0:
15511590
is-subset "^0.1.1"
15521591
modify-values "^1.0.0"
15531592

1593+
conventional-commits-parser@^1.3.0:
1594+
version "1.3.0"
1595+
resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-1.3.0.tgz#e327b53194e1a7ad5dc63479ee9099a52b024865"
1596+
dependencies:
1597+
JSONStream "^1.0.4"
1598+
is-text-path "^1.0.0"
1599+
lodash "^4.2.1"
1600+
meow "^3.3.0"
1601+
split2 "^2.0.0"
1602+
through2 "^2.0.0"
1603+
trim-off-newlines "^1.0.0"
1604+
15541605
conventional-commits-parser@^2.0.0:
15551606
version "2.0.0"
15561607
resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.0.0.tgz#71d01910cb0a99aeb20c144e50f81f4df3178447"
@@ -2635,6 +2686,12 @@ forwarded@~0.1.0:
26352686
version "0.1.1"
26362687
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.1.tgz#8a4e30c640b05395399a3549c730257728048961"
26372688

2689+
franc@^2.0.0:
2690+
version "2.0.0"
2691+
resolved "https://registry.yarnpkg.com/franc/-/franc-2.0.0.tgz#d9939eded4b486acf4b9f33591fe8e69e5464616"
2692+
dependencies:
2693+
trigram-utils "^0.1.0"
2694+
26382695
26392696
version "0.5.0"
26402697
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e"
@@ -2752,6 +2809,10 @@ get-stdin@^4.0.1:
27522809
version "4.0.1"
27532810
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
27542811

2812+
get-stdin@^5.0.1:
2813+
version "5.0.1"
2814+
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398"
2815+
27552816
get-stream@^3.0.0:
27562817
version "3.0.0"
27572818
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
@@ -2768,7 +2829,7 @@ git-head@^1.2.1:
27682829
dependencies:
27692830
git-refs "^1.1.3"
27702831

2771-
git-raw-commits@^1.2.0:
2832+
git-raw-commits@^1.1.2, git-raw-commits@^1.2.0:
27722833
version "1.2.0"
27732834
resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.2.0.tgz#0f3a8bfd99ae0f2d8b9224d58892975e9a52d03c"
27742835
dependencies:
@@ -3196,6 +3257,12 @@ ignore@^3.3.3:
31963257
version "3.3.5"
31973258
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.5.tgz#c4e715455f6073a8d7e5dae72d2fc9d71663dba6"
31983259

3260+
import-from@^2.1.0:
3261+
version "2.1.0"
3262+
resolved "https://registry.yarnpkg.com/import-from/-/import-from-2.1.0.tgz#335db7f2a7affd53aaa471d4b8021dee36b7f3b1"
3263+
dependencies:
3264+
resolve-from "^3.0.0"
3265+
31993266
imurmurhash@^0.1.4:
32003267
version "0.1.4"
32013268
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
@@ -4292,6 +4359,18 @@ [email protected]:
42924359
version "0.0.7"
42934360
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
42944361

4362+
mz@^2.6.0:
4363+
version "2.7.0"
4364+
resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32"
4365+
dependencies:
4366+
any-promise "^1.0.0"
4367+
object-assign "^4.0.1"
4368+
thenify-all "^1.0.0"
4369+
4370+
n-gram@^0.1.0:
4371+
version "0.1.2"
4372+
resolved "https://registry.yarnpkg.com/n-gram/-/n-gram-0.1.2.tgz#9acecb0f797fbfd22a0ad8a28d987880a63002ab"
4373+
42954374
nan@^2.3.0, nan@^2.3.2:
42964375
version "2.7.0"
42974376
resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46"
@@ -4940,6 +5019,10 @@ portfinder@^1.0.9:
49405019
debug "^2.2.0"
49415020
mkdirp "0.5.x"
49425021

5022+
pos@^0.4.2:
5023+
version "0.4.2"
5024+
resolved "https://registry.yarnpkg.com/pos/-/pos-0.4.2.tgz#20e9c77fbeedcc356823cea63c7585cace93be2a"
5025+
49435026
postcss-calc@^5.2.0:
49445027
version "5.3.1"
49455028
resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e"
@@ -5747,6 +5830,10 @@ resolve-from@^1.0.0:
57475830
version "1.0.1"
57485831
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"
57495832

5833+
resolve-from@^3.0.0:
5834+
version "3.0.0"
5835+
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748"
5836+
57505837
57515838
version "2.1.0"
57525839
resolved "https://registry.yarnpkg.com/resolve-url-loader/-/resolve-url-loader-2.1.0.tgz#27c95cc16a4353923fdbdc2dbaf5eef22232c477"
@@ -6493,6 +6580,18 @@ [email protected], text-table@~0.2.0:
64936580
version "0.2.0"
64946581
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
64956582

6583+
thenify-all@^1.0.0:
6584+
version "1.6.0"
6585+
resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726"
6586+
dependencies:
6587+
thenify ">= 3.1.0 < 4"
6588+
6589+
"thenify@>= 3.1.0 < 4":
6590+
version "3.3.0"
6591+
resolved "https://registry.yarnpkg.com/thenify/-/thenify-3.3.0.tgz#e69e38a1babe969b0108207978b9f62b88604839"
6592+
dependencies:
6593+
any-promise "^1.0.0"
6594+
64966595
through2@^2.0.0, through2@^2.0.2:
64976596
version "2.0.3"
64986597
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
@@ -6573,6 +6672,12 @@ [email protected]:
65736672
request-promise "^4.1.1"
65746673
travis-ci "^2.1.1"
65756674

6675+
trigram-utils@^0.1.0:
6676+
version "0.1.1"
6677+
resolved "https://registry.yarnpkg.com/trigram-utils/-/trigram-utils-0.1.1.tgz#7df8a092c9897fc2e09dac22f423e283231762e7"
6678+
dependencies:
6679+
n-gram "^0.1.0"
6680+
65766681
trim-newlines@^1.0.0:
65776682
version "1.0.0"
65786683
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613"

0 commit comments

Comments
 (0)