Skip to content

Commit 816c737

Browse files
committed
autoformat code on precommit hook
Closes #312
1 parent 0236bf5 commit 816c737

2 files changed

Lines changed: 724 additions & 21 deletions

File tree

‎package.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,25 @@
2929
"devDependencies": {
3030
"all-contributors-cli": "^6.1.2",
3131
"bs-platform": "^4.0.18",
32+
"husky": "^1.3.1",
33+
"lint-staged": "^8.1.5",
3234
"live-server": "^1.2.0",
3335
"reason-react": "^0.6.0",
3436
"replace": "^1.1.0"
3537
},
3638
"peerDependencies": {
3739
"react-native": "^0.53.3",
3840
"reason-react": "^0.6.0"
41+
},
42+
"lint-staged": {
43+
"*.re": [
44+
"bsrefmt --in-place",
45+
"git add"
46+
]
47+
},
48+
"husky": {
49+
"hooks": {
50+
"pre-commit": "lint-staged"
51+
}
3952
}
4053
}

0 commit comments

Comments
 (0)