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
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
|
||||
yarn type-check
|
||||
yarn type-check && yarn lint
|
||||
|
|
|
@ -11,13 +11,12 @@
|
|||
"tc": "yarn type-check --watch",
|
||||
"type-check": "tsc --pretty --noEmit",
|
||||
"format": "prettier --write .",
|
||||
"lint": "eslint . --ext ts --ext tsx --ext js",
|
||||
"lint": "eslint . --ext ts --ext tsx --ext js --ext jsx",
|
||||
"test": "jest",
|
||||
"test-all": "yarn lint && yarn type-check && yarn test"
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.@(ts|tsx)": [
|
||||
"yarn lint",
|
||||
"*.@(ts|tsx|js|jsx)": [
|
||||
"yarn format"
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue