Skip to content

Commit

Permalink
Fix husky pre-commit hook and have it run ejslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Coteh committed Oct 16, 2023
1 parent 440dad3 commit 94af3f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run lint:ejs && npm run format:staged
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"test:e2e": "cypress run --e2e --browser chrome",
"test:cypress": "cypress open",
"format": "prettier --write .",
"format:staged": "pretty-quick --staged",
"lint:ejs": "ejslint views/**/*.ejs",
"watch:client": "webpack -w"
},
"dependencies": {
Expand Down Expand Up @@ -76,11 +78,6 @@
"session-file-store": "^1.5.0",
"sinon": "^14.0.2"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"config": {
"mongodbMemoryServer": {
"version": "4.4.6"
Expand Down

0 comments on commit 94af3f4

Please sign in to comment.