Skip to content

Commit ae27266

Browse files
committed
添加代码提交时规范检测的配置
1 parent 390b2af commit ae27266

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@
5050
"eslint-plugin-promise": "^4.2.1",
5151
"eslint-plugin-standard": "^4.0.0",
5252
"eslint-plugin-vue": "^6.2.2",
53+
"husky": "^4.3.8",
5354
"less": "^3.0.4",
5455
"less-loader": "^5.0.0",
56+
"lint-staged": "^10.5.3",
5557
"vue-template-compiler": "^2.6.11"
5658
},
5759
"eslintConfig": {
@@ -86,5 +88,16 @@
8688
],
8789
"jest": {
8890
"preset": "@vue/cli-plugin-unit-jest"
91+
},
92+
"lint-staged": {
93+
"src/**/*.{js,vue}": [
94+
"eslint --fix",
95+
"git add"
96+
]
97+
},
98+
"husky": {
99+
"hooks": {
100+
"pre-commit": "lint-staged"
101+
}
89102
}
90103
}

0 commit comments

Comments
 (0)