Skip to content

Commit de10a08

Browse files
committed
Add precommit hook
1 parent 0b9d7ab commit de10a08

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.lintstagedrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.js": ["standard --fix", "git add"]
3+
}

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
"test": "node test/all-the-readmes.js",
1111
"watch": "babel src --out-dir dist --watch",
1212
"build": "babel src --out-dir dist",
13-
"lint": "standard --fix"
13+
"lint": "standard --fix",
14+
"precommit": "lint-staged"
1415
},
1516
"keywords": [],
1617
"author": "William Hilton <[email protected]>",
@@ -40,6 +41,8 @@
4041
"babel-plugin-transform-object-rest-spread": "^6.23.0",
4142
"chalk": "^1.1.3",
4243
"diff": "^3.2.0",
44+
"husky": "^0.13.2",
45+
"lint-staged": "^3.4.0",
4346
"npm-run-all": "^4.0.2",
4447
"package-stream": "^3.0.0",
4548
"standard": "^9.0.2"

0 commit comments

Comments
 (0)