Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit b7a3737

Browse files
authored
Merge pull request #107 from segmentio/chore/commit-convention
Setup commitizen and commitlint
2 parents 0b059a9 + 0962d3d commit b7a3737

File tree

3 files changed

+708
-46
lines changed

3 files changed

+708
-46
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
key: yarn-dependency-cache-{{ checksum "yarn.lock" }}
1818
paths:
1919
- node_modules
20+
- run: yarn commitlint-circle
2021
- run: make test
2122
- store_test_results:
2223
path: junit-reports

package.json

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,9 @@
1515
"lint": "eslint \"./{lib,test}/**/*.js\"",
1616
"format": "prettier-eslint --write --list-different \"./{lib,test}/**/*.{js,json,md}\"",
1717
"precommit": "lint-staged",
18-
"np": "np --no-publish"
19-
},
20-
"lint-staged": {
21-
"linters": {
22-
"*.{js,json,md}": [
23-
"prettier-eslint --write",
24-
"git add"
25-
]
26-
}
18+
"np": "np --no-publish",
19+
"cz": "git-cz",
20+
"commitmsg": "commitlint -E GIT_PARAMS"
2721
},
2822
"repository": {
2923
"type": "git",
@@ -73,13 +67,18 @@
7367
"uuid": "^2.0.2"
7468
},
7569
"devDependencies": {
70+
"@commitlint/cli": "^7.0.0",
71+
"@commitlint/config-conventional": "^7.0.1",
7672
"@segment/analytics.js-integration": "^3.2.1",
7773
"@segment/eslint-config": "^4.0.0",
7874
"browserify": "13.0.0",
7975
"browserify-istanbul": "^2.0.0",
8076
"codecov": "^3.0.2",
77+
"commitizen": "^2.10.1",
78+
"commitlint-circle": "^1.0.0",
8179
"compat-trigger-event": "^1.0.0",
8280
"component-each": "^0.2.6",
81+
"cz-conventional-changelog": "^2.1.0",
8382
"eslint": "^4.19.1",
8483
"eslint-config-prettier": "^2.9.0",
8584
"eslint-plugin-mocha": "^5.0.0",
@@ -107,5 +106,23 @@
107106
"sinon": "^1.7.3",
108107
"snyk": "^1.83.0",
109108
"watchify": "^3.7.0"
109+
},
110+
"commitlint": {
111+
"extends": [
112+
"@commitlint/config-conventional"
113+
]
114+
},
115+
"lint-staged": {
116+
"linters": {
117+
"*.{js,json,md}": [
118+
"prettier-eslint --write",
119+
"git add"
120+
]
121+
}
122+
},
123+
"config": {
124+
"commitizen": {
125+
"path": "cz-conventional-changelog"
126+
}
110127
}
111128
}

0 commit comments

Comments
 (0)