Skip to content

Commit 2696414

Browse files
committed
chore(linter): setup code format pre git commit
1 parent 2f6ad65 commit 2696414

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@
77
"tester": "mocha --reporter=spec ./test/**/*.test.js",
88
"coverage": "istanbul cover _mocha ./test/**/*.test.js",
99
"lint": "standard './test/**/*.js' './lib/**/*.js' --verbose | snazzy",
10-
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
10+
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
11+
"precommit": "lint-staged"
12+
},
13+
"lint-staged": {
14+
"*.js": [
15+
"npm run prettier-standard-formatter",
16+
"git add"
17+
]
1118
},
1219
"repository": {
1320
"type": "git",
@@ -30,8 +37,11 @@
3037
"body-parser": "^1.17.0",
3138
"debug": "^2.4.0",
3239
"http-status-codes": "^1.0.5",
40+
"husky": "^0.13.4",
3341
"inflection": "^1.7.2",
42+
"lint-staged": "^3.6.1",
3443
"lodash": "^4.17.1",
44+
"prettier-standard-formatter": "^0.222222222222222.333333333333333",
3545
"snazzy": "^7.0.0",
3646
"type-is": "^1.6.14"
3747
},

0 commit comments

Comments
 (0)