Skip to content

Commit 4ef98e6

Browse files
committed
git hooks added
1 parent 5c400a7 commit 4ef98e6

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

package.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"eslint-plugin-node": "^11.1.0",
4747
"eslint-plugin-promise": "^5.1.0",
4848
"eslint-plugin-vue": "^7.11.1",
49+
"lint-staged": "^11.0.0",
4950
"vue-template-compiler": "^2.6.14"
5051
},
5152
"eslintConfig": {
@@ -82,5 +83,18 @@
8283
"> 1%",
8384
"last 2 versions",
8485
"not ie <= 8"
85-
]
86+
],
87+
"gitHooks": {
88+
"pre-commit": "lint-staged"
89+
},
90+
"lint-staged": {
91+
"*.js": [
92+
"vue-cli-service lint",
93+
"git add"
94+
],
95+
"*.vue": [
96+
"vue-cli-service lint",
97+
"git add"
98+
]
99+
}
86100
}

0 commit comments

Comments
 (0)