Browse Source

build: add husky

main
mashirozx 7 months ago
parent
commit
9068244dd5
  1. 1
      .eslintrc.js
  2. 4
      .husky/pre-commit
  3. 6
      package.json
  4. 2
      src/configs/index.js
  5. 5
      yarn.lock

1
.eslintrc.js

@ -1,3 +1,4 @@
/* eslint-disable no-process-env */
module.exports = {
root: true,
env: {

4
.husky/pre-commit

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

6
package.json

@ -9,7 +9,8 @@
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"lint": "vue-cli-service lint",
"jsdoc": "./node_modules/.bin/jsdoc"
"jsdoc": "./node_modules/.bin/jsdoc",
"prepare": "husky install"
},
"dependencies": {
"@vue/composition-api": "^1.4.1",
@ -47,6 +48,7 @@
"prettier": "^2.2.1",
"sass": "^1.44.0",
"sass-loader": "^8.0.2",
"vue-template-compiler": "^2.6.11"
"vue-template-compiler": "^2.6.11",
"husky": "^7.0.0"
}
}

2
src/configs/index.js

@ -1,4 +1,4 @@
/* eslint no-process-env: 0 */
/* eslint-disable no-process-env */
export const appName = "agk-admin";
export const baseUrl = process.env.BASE_URL;
export const gitVersion = process.env.VUE_APP_GIT_HASH;

5
yarn.lock

@ -5353,6 +5353,11 @@ humps@^2.0.1:
resolved "https://registry.npm.taobao.org/humps/download/humps-2.0.1.tgz#dd02ea6081bd0568dc5d073184463957ba9ef9aa"
integrity sha1-3QLqYIG9BWjcXQcxhEY5V7qe+ao=
husky@^7.0.0:
version "7.0.4"
resolved "https://registry.npmmirror.com/husky/download/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535"
integrity sha1-JCBIJF3EnI+xvwzHz7mN1yJTFTU=
iconv-lite@0.4.24, iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.nlark.com/iconv-lite/download/iconv-lite-0.4.24.tgz?cache=0&sync_timestamp=1621826271136&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ficonv-lite%2Fdownload%2Ficonv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"

Loading…
Cancel
Save