Skip to content

Commit

Permalink
Run prettier check pre-commit (AMPATH#1095)
Browse files Browse the repository at this point in the history
It's pretty annoying to have your PR fail a CI status check because Prettier didn't run on your staged
files pre-commit. This PR fixes that by explicitly calling `prettier --check` in the pre-commit hook.
  • Loading branch information
denniskigen authored Aug 11, 2021
1 parent 5bb29db commit 87f83ba
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
}
},
"lint-staged": {
"*.{js,css,md,json}": "prettier --write"
"*.{js,css,md,json}": [
"prettier --write",
"prettier --check"
]
},
"pre-commit": "npm test",
"author": "AMPATH DEVS",
Expand Down

0 comments on commit 87f83ba

Please sign in to comment.