Skip to content

Commit

Permalink
Enable Prettier as a pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
KristjanESPERANTO committed Nov 19, 2023
1 parent 2584206 commit a90dfdc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
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"

npx lint-staged
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
],
"main": "MMM-OnThisDay.js",
"scripts": {
"prepare": "husky install",
"prettier:fix": "prettier --write .",
"test": "nyc mocha test/unit --recursive && prettier --check .",
"test-functional": "mocha test/functional --recursive"
Expand All @@ -24,12 +25,17 @@
"jsdom": "^22.1.0"
},
"devDependencies": {
"husky": "^8.0.3",
"lint-staged": "^15.1.0",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"prettier": "^3.1.0",
"proxyquire": "^2.1.3",
"sinon": "^17.0.1"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown"
},
"nyc": {
"reporter": [
"text",
Expand Down

0 comments on commit a90dfdc

Please sign in to comment.