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

Commit a2229f4

Browse files
author
sw-yx
committed
add husky and lintstaged
1 parent 20fa1bb commit a2229f4

File tree

2 files changed

+6939
-4
lines changed

2 files changed

+6939
-4
lines changed

package.json

+17-4
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@
1717
"chokidar": "^2.1.5",
1818
"copy-template-dir": "^1.4.0",
1919
"debug": "^4.1.1",
20-
"npm-packlist": "^1.4.1",
21-
"precinct": "^6.1.2",
22-
"read-pkg-up": "^5.0.0",
23-
"require-package-name": "^2.0.1",
2420
"execa": "^1.0.0",
2521
"express": "^4.16.4",
2622
"express-logging": "^1.1.1",
@@ -35,7 +31,11 @@
3531
"netlify": "2.4.1",
3632
"netlify-cli-logo": "^1.0.0",
3733
"node-fetch": "^2.3.0",
34+
"npm-packlist": "^1.4.1",
3835
"ora": "^3.4.0",
36+
"precinct": "^6.1.2",
37+
"read-pkg-up": "^5.0.0",
38+
"require-package-name": "^2.0.1",
3939
"resolve": "^1.10.0",
4040
"safe-join": "^0.1.2",
4141
"static-server": "^2.2.1",
@@ -55,6 +55,8 @@
5555
"eslint-plugin-prettier": "^3.0.1",
5656
"gh-release": "^3.5.0",
5757
"globby": "^8",
58+
"husky": "^2.2.0",
59+
"lint-staged": "^8.1.6",
5860
"mocha": "^5",
5961
"nock": "^10.0.6",
6062
"npm-run-all": "^4.1.5",
@@ -82,6 +84,17 @@
8284
"@oclif/plugin-help"
8385
]
8486
},
87+
"husky": {
88+
"hooks": {
89+
"pre-commit": "lint-staged"
90+
}
91+
},
92+
"lint-staged": {
93+
"src/*.js": [
94+
"npm run format",
95+
"git add"
96+
]
97+
},
8598
"repository": "netlify/netlify-dev-plugin",
8699
"scripts": {
87100
"format": "npm run format:prettier -- --write",

0 commit comments

Comments
 (0)