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

Commit a093020

Browse files
committed
chore(git): add commitizen and commitlint
1 parent 0b059a9 commit a093020

File tree

2 files changed

+667
-44
lines changed

2 files changed

+667
-44
lines changed

package.json

Lines changed: 25 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,17 @@
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",
8178
"compat-trigger-event": "^1.0.0",
8279
"component-each": "^0.2.6",
80+
"cz-conventional-changelog": "^2.1.0",
8381
"eslint": "^4.19.1",
8482
"eslint-config-prettier": "^2.9.0",
8583
"eslint-plugin-mocha": "^5.0.0",
@@ -107,5 +105,23 @@
107105
"sinon": "^1.7.3",
108106
"snyk": "^1.83.0",
109107
"watchify": "^3.7.0"
108+
},
109+
"commitlint": {
110+
"extends": [
111+
"@commitlint/config-conventional"
112+
]
113+
},
114+
"lint-staged": {
115+
"linters": {
116+
"*.{js,json,md}": [
117+
"prettier-eslint --write",
118+
"git add"
119+
]
120+
}
121+
},
122+
"config": {
123+
"commitizen": {
124+
"path": "cz-conventional-changelog"
125+
}
110126
}
111127
}

0 commit comments

Comments
 (0)