Skip to content

Commit af34892

Browse files
committed
pre commit git hook
1 parent ef21579 commit af34892

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env sh
22
. "$(dirname -- "$0")/_/husky.sh"
33

4-
npx lint-staged --config .lintstagedrc
4+
npx lint-staged --config package.json

.lintstagedrc

Lines changed: 0 additions & 6 deletions
This file was deleted.

package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,15 @@
157157
"uglify-js": "^3.15.4",
158158
"webpack-dev-server": "^4.8.1"
159159
},
160+
"lint-staged": {
161+
"{libs,apps}/**/*.{ts,json,md,html,?(s)css}": [
162+
"npm run affected:lint:write",
163+
"npm run format:write"
164+
],
165+
"*.json": [
166+
"npm run format:write"
167+
]
168+
},
160169
"description": "[![Join our Slack, #codelab channel](https://img.shields.io/badge/slack-%23codelab-yellowgreen)](https://nycjsorg.now.sh) [![Check out the demo](https://img.shields.io/badge/see%20the-Demo-brightgreen)](https://codelab.fun)",
161170
"bugs": {
162171
"url": "https://github.com/codelab-fun/codelab/issues"

0 commit comments

Comments
 (0)