Skip to content

Commit c1ebb3a

Browse files
package.json:add husky && pretty-quick && lint-staged
1 parent 18b5429 commit c1ebb3a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"dist": "rimraf dist && tsc",
99
"lint": "eslint . --ext .ts",
1010
"test": "jest --detectOpenHandles --colors",
11-
"lint-and-fix": "eslint . --ext .ts --fix",
11+
"lint-and-fix": "eslint . --ext .ts --fix --cache",
1212
"prettier-format": "prettier --config .prettierrc 'src/**/*.ts' --write"
1313
},
1414
"repository": {
@@ -28,9 +28,11 @@
2828
"@typescript-eslint/eslint-plugin": "^2.32.0",
2929
"@typescript-eslint/parser": "^2.32.0",
3030
"eslint": "^7.0.0",
31+
"husky": "^4.2.5",
3132
"jest": "^26.0.1",
3233
"jest-junit": "^10.0.0",
3334
"prettier": "^2.0.5",
35+
"pretty-quick": "^2.0.1",
3436
"rimraf": "^3.0.2",
3537
"ts-jest": "^26.1.0",
3638
"ts-node-dev": "^1.0.0-pre.49",
@@ -39,5 +41,13 @@
3941
},
4042
"dependencies": {
4143
"express": "^4.17.1"
44+
},
45+
"hooks": {
46+
"pre-commit": "pretty-quick --staged --bail && lint-staged"
47+
},
48+
"lint-staged": {
49+
"*.ts": [
50+
"npm run lint-and-fix"
51+
]
4252
}
4353
}

0 commit comments

Comments
 (0)