Skip to content

Commit

Permalink
feat: add prettier to pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
shresthagrawal committed Oct 31, 2022
1 parent 719c47b commit 828c81c
Show file tree
Hide file tree
Showing 4 changed files with 403 additions and 6 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 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 13,7 @@
"private": false,
"scripts": {
"build": "tsc",
"prepare": "npm run build",
"prepare": "npm run build && husky install",
"prettier:check": "npx prettier -c .",
"prettier:fix": "npx prettier -w ."
},
Expand All @@ -37,6 37,8 @@
"@types/express": "4.17.13",
"@types/lodash": "4.14.182",
"dotenv": "16.0.2",
"husky": ">=6",
"lint-staged": ">=10",
"prettier": "2.7.1",
"pretty-quick": "3.1.3",
"ts-essentials": "9.1.2",
Expand All @@ -55,5 57,8 @@
"ethereum",
"pos",
"rpc"
]
],
"lint-staged": {
"*.{js,css,md}": "prettier --write"
}
}
Loading

0 comments on commit 828c81c

Please sign in to comment.