Skip to content

Commit 5fa3236

Browse files
authored
Add lint-staged and precommit hook (bvaughn#1082)
1 parent a2f681a commit 5fa3236

File tree

2 files changed

+1022
-4
lines changed

2 files changed

+1022
-4
lines changed

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,14 @@
3838
"test:jest": "jest --no-watchman --runInBand",
3939
"test:ci": "jest --no-watchman --maxWorkers 2 --coverage && codecov",
4040
"watch": "watch 'clear && npm run test -s' source",
41-
"watch:jest": "jest --no-watchman --watch"
41+
"watch:jest": "jest --no-watchman --watch",
42+
"precommit": "lint-staged"
43+
},
44+
"lint-staged": {
45+
"*.{js,md}": [
46+
"prettier --write",
47+
"git add"
48+
]
4249
},
4350
"babel": {
4451
"presets": [
@@ -137,6 +144,7 @@
137144
"immutable": "^3.7.5",
138145
"jest": "^22.0.4",
139146
"jest-environment-puppeteer": "^1.1.1",
147+
"lint-staged": "^7.0.4",
140148
"postcss": "^6.0.14",
141149
"postcss-cli": "^4.1.1",
142150
"postcss-loader": "^2.0.9",

0 commit comments

Comments
 (0)