Skip to content

Commit 843098f

Browse files
chore(package): set up commitlint with husky
Save devDependencies: * @commitlint/cli@5.2.3 * @commitlint/config-conventional@5.2.3 * husky@0.14.3 http://marionebl.github.io/commitlint/#/guides-local-setup
1 parent fbefe7b commit 843098f

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

.commitlintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"]
3+
}

.npmignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ coverage
33
examples
44
test
55
webpack.config.js
6+
.commitlintrc*
67
.eslint*
7-
.travis*
88
.npm*
9+
.travis*

package.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
"author": "Mark <mark@remarkablemark.org>",
66
"main": "index.js",
77
"scripts": {
8-
"prepublishOnly": "npm run clean && npm run build:unmin && npm run build:min",
9-
"release": "standard-version",
10-
"clean": "rm -rf dist",
118
"build:unmin": "NODE_ENV=development webpack index.js dist/html-react-parser.js",
129
"build:min": "NODE_ENV=production webpack -p index.js dist/html-react-parser.min.js",
13-
"test": "mocha",
10+
"clean": "rm -rf dist",
11+
"commitmsg": "commitlint -e $GIT_PARAMS",
12+
"cover": "istanbul cover _mocha -- -R spec \"test/**/*\"",
13+
"coveralls": "cat coverage/lcov.info | coveralls",
1414
"lint": "eslint --ignore-path .gitignore .",
1515
"lint:fix": "npm run lint -- --fix",
16-
"cover": "istanbul cover _mocha -- -R spec \"test/**/*\"",
17-
"coveralls": "cat coverage/lcov.info | coveralls"
16+
"prepublishOnly": "npm run clean && npm run build:unmin && npm run build:min",
17+
"release": "standard-version",
18+
"test": "mocha"
1819
},
1920
"repository": {
2021
"type": "git",
@@ -36,8 +37,11 @@
3637
"style-to-object": "0.2.0"
3738
},
3839
"devDependencies": {
40+
"@commitlint/cli": "^5.2.3",
41+
"@commitlint/config-conventional": "^5.2.3",
3942
"coveralls": "^3.0.0",
4043
"eslint": "^4.12.0",
44+
"husky": "^0.14.3",
4145
"istanbul": "^0.4.5",
4246
"mocha": "^4.0.1",
4347
"react": "^16",

0 commit comments

Comments
 (0)