Add and setup husky

pull/398/head
Amrit Timalsina 2022-10-15 00:18:15 +05:45
parent 81c5c517df
commit a058a58386
3 changed files with 31 additions and 3 deletions

4
.husky/pre-commit Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run test:eslint

24
package-lock.json generated
View File

@ -41,6 +41,7 @@
"eslint": "^8.24.0",
"eslint-plugin-vue": "^9.5.1",
"esm": "^3.2.25",
"husky": "^7.0.0",
"jest": "^29.1.2",
"jest-environment-jsdom": "^29.1.2",
"node-fetch": "^3.2.10",
@ -9301,6 +9302,21 @@
"node": ">=10.17.0"
}
},
"node_modules/husky": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz",
"integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==",
"dev": true,
"bin": {
"husky": "lib/bin.js"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
@ -23502,7 +23518,7 @@
},
"do-bulma": {
"version": "git+ssh://git@github.com/do-community/do-bulma.git#798588c92e40fb6368898e6523a6c461757caf45",
"from": "do-bulma@https://github.com/do-community/do-bulma",
"from": "do-bulma@github:do-community/do-bulma",
"requires": {
"bulma": "^0.9.4"
}
@ -25374,6 +25390,12 @@
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="
},
"husky": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/husky/-/husky-7.0.4.tgz",
"integrity": "sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ==",
"dev": true
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",

View File

@ -26,7 +26,8 @@
"test:eslint": "eslint 'src/**/*.{js,vue}'",
"test:eslint:fix": "npm run test:eslint -- --fix",
"test:stylelint": "stylelint 'src/**/*.scss' --config node_modules/do-bulma/.stylelintrc.json",
"test:i18n-packs": "node --es-module-specifier-resolution=node src/nginxconfig/i18n/verify.js"
"test:i18n-packs": "node --es-module-specifier-resolution=node src/nginxconfig/i18n/verify.js",
"prepare": "husky install"
},
"jest": {
"testRegex": "/test/.*.js?$"
@ -87,7 +88,8 @@
"stylelint-order": "^5.0.0",
"vue-template-compiler": "^2.7.10",
"webpack": "^5.74.0",
"webpack-bundle-analyzer": "^4.6.1"
"webpack-bundle-analyzer": "^4.6.1",
"husky": "^7.0.0"
},
"overrides": {
"@vue/cli-service": {