Skip to content

Commit b4d2c26

Browse files
authored
add husky pre-commit pretty-quick (#208)
1 parent 57375c2 commit b4d2c26

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.husky/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npx pretty-quick --staged

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"./examples/*"
99
],
1010
"scripts": {
11+
"prepare": "husky install",
1112
"benchmark": "NODE_ENV=production ts-node --project tsconfig.benchmark.json benchmark/execute.case.ts",
1213
"postinstall": "patch-package",
1314
"lint": "eslint --config .eslintrc.json --ext .ts .",
@@ -21,6 +22,8 @@
2122
"prettier": "prettier --ignore-path .gitignore --write --list-different \"**/*.{ts,tsx,graphql,yml}\""
2223
},
2324
"devDependencies": {
25+
"prettier": "2.3.0",
26+
"pretty-quick": "3.1.0",
2427
"apollo-server": "2.24.1",
2528
"@graphql-tools/schema": "7.1.5",
2629
"@types/benchmark": "2.1.0",
@@ -48,7 +51,8 @@
4851
"jest": "26.6.3"
4952
},
5053
"resolutions": {
51-
"@changesets/git": "1.1.1"
54+
"@changesets/git": "1.1.1",
55+
"prettier": "2.3.0"
5256
},
5357
"lint-staged": {
5458
"packages/**/src/**/*.{ts,tsx}": [

0 commit comments

Comments
 (0)