only format staged files on pre-commit and lint & type-check on push
This commit is contained in:
parent
5eff6011d8
commit
057798b2a1
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. "$(dirname "$0")/_/husky.sh"
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
yarn type-check
|
yarn type-check && yarn lint
|
||||||
|
|
|
@ -11,13 +11,12 @@
|
||||||
"tc": "yarn type-check --watch",
|
"tc": "yarn type-check --watch",
|
||||||
"type-check": "tsc --pretty --noEmit",
|
"type-check": "tsc --pretty --noEmit",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"lint": "eslint . --ext ts --ext tsx --ext js",
|
"lint": "eslint . --ext ts --ext tsx --ext js --ext jsx",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test-all": "yarn lint && yarn type-check && yarn test"
|
"test-all": "yarn lint && yarn type-check && yarn test"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.@(ts|tsx)": [
|
"*.@(ts|tsx|js|jsx)": [
|
||||||
"yarn lint",
|
|
||||||
"yarn format"
|
"yarn format"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue