From e574f0e0f25bce5f36a0e32a1260b483166dac9d Mon Sep 17 00:00:00 2001 From: buqiyuan <1743369777@qq.com> Date: Thu, 30 Jun 2022 00:51:48 +0800 Subject: [PATCH] chore: upgrade deps & lint config --- .vscode/launch.json | 2 +- .vscode/settings.json | 47 +- package.json | 56 +- .../core/schema-form/src/schema-form-item.vue | 15 +- src/hooks/useBattery.ts | 6 +- src/router/generator-router.tsx | 33 +- src/router/index.ts | 2 +- src/router/outsideLayout.ts | 2 +- tsconfig.json | 24 +- yarn.lock | 2128 +++++++++-------- 10 files changed, 1186 insertions(+), 1129 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 2dd66e881..1b6d7768d 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,4 +10,4 @@ "sourceMaps": true } ] -} \ No newline at end of file +} diff --git a/.vscode/settings.json b/.vscode/settings.json index e1868fc7e..960048a28 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,11 +1,32 @@ { "typescript.tsdk": "./node_modules/typescript/lib", - "volar.tsPlugin": true, - "volar.tsPluginStatus": false, "npm.packageManager": "yarn", "editor.tabSize": 2, + "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", "files.eol": "\n", + "eslint.probe": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "html", + "vue", + "markdown", + "json", + "jsonc" + ], + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "html", + "vue", + "markdown", + "json", + "jsonc" + ], "search.exclude": { "**/node_modules": true, "**/*.log": true, @@ -83,28 +104,16 @@ "[markdown]": { "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "editor.codeActionsOnSave": { - "source.fixAll.eslint": true - }, - "[vue]": { - "editor.codeActionsOnSave": { - "source.fixAll.eslint": true - } + "[jsonc]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" }, - "i18n-ally.localesPaths": [ - "src/locales/lang" - ], + "i18n-ally.localesPaths": ["src/locales/lang"], "i18n-ally.keystyle": "nested", "i18n-ally.sortKeys": true, "i18n-ally.namespace": true, "i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}", - "i18n-ally.enabledParsers": [ - "ts" - ], + "i18n-ally.enabledParsers": ["ts"], "i18n-ally.sourceLanguage": "en", "i18n-ally.displayLanguage": "zh-CN", - "i18n-ally.enabledFrameworks": [ - "vue", - "react" - ] + "i18n-ally.enabledFrameworks": ["vue", "react"] } diff --git a/package.json b/package.json index 755ca6ba5..ef9a03459 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,9 @@ "clean:lib": "npx rimraf node_modules", "deploy": "npm run build && npx gh-pages -d dist", "dev:debug": "cross-env DEBUG_ANTDV=true npm run serve", - "lint": "vue-cli-service lint", + "format": "prettier --write .", + "lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx,.md,.json --max-warnings 0 && pretty-quick --check --branch dev", + "lint:fix": "eslint --fix . --ext .vue,.js,.ts,.jsx,.tsx,.md,.json && pretty-quick --branch dev", "lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix", "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", "lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/", @@ -32,10 +34,10 @@ }, "dependencies": { "@ant-design/icons-vue": "^6.1.0", - "@vueuse/core": "^8.6.0", - "ant-design-vue": "3.2.6", + "@vueuse/core": "^8.7.5", + "ant-design-vue": "3.2.9", "axios": "^0.27.2", - "core-js": "^3.22.8", + "core-js": "^3.23.3", "dayjs": "^1.11.3", "file-saver": "^2.0.5", "lodash-es": "^4.17.21", @@ -43,7 +45,7 @@ "mockjs": "^1.1.0", "nprogress": "^1.0.0-1", "pinia": "2.0.14", - "qs": "^6.10.5", + "qs": "^6.11.0", "socket.io-client": "4.5.1", "sortablejs": "^1.15.0", "vue": "3.2.37", @@ -53,37 +55,38 @@ "xlsx": "^0.18.5" }, "devDependencies": { - "@commitlint/cli": "^17.0.2", - "@commitlint/config-conventional": "^17.0.2", + "@commitlint/cli": "^17.0.3", + "@commitlint/config-conventional": "^17.0.3", "@types/lodash-es": "^4.17.6", - "@types/node": "^17.0.42", + "@types/node": "^18.0.0", "@types/webpack-env": "^1.17.0", - "@typescript-eslint/eslint-plugin": "^5.27.1", - "@typescript-eslint/parser": "^5.27.1", - "@vue/cli-plugin-babel": "^5.0.4", - "@vue/cli-plugin-eslint": "^5.0.4", - "@vue/cli-plugin-router": "^5.0.4", - "@vue/cli-plugin-typescript": "^5.0.4", - "@vue/cli-service": "^5.0.4", - "@vue/eslint-config-typescript": "^10.0.0", + "@typescript-eslint/eslint-plugin": "^5.30.0", + "@typescript-eslint/parser": "^5.30.0", + "@vue/cli-plugin-babel": "^5.0.6", + "@vue/cli-plugin-eslint": "^5.0.6", + "@vue/cli-plugin-router": "^5.0.6", + "@vue/cli-plugin-typescript": "^5.0.6", + "@vue/cli-service": "^5.0.6", + "@vue/eslint-config-typescript": "^11.0.0", "babel-plugin-import": "^1.13.5", "commitizen": "^4.2.4", "conventional-changelog-cli": "^2.2.2", "cross-env": "^7.0.3", - "cz-git": "^1.2.8", - "eslint": "^8.17.0", + "cz-git": "^1.3.8", + "eslint": "^8.18.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-import": "2.26.0", - "eslint-plugin-prettier": "^4.0.0", + "eslint-plugin-prettier": "^4.1.0", "eslint-plugin-vue": "^9.1.1", "husky": "^8.0.1", "less": "^4.1.3", - "less-loader": "10.2.0", - "lint-staged": "^13.0.1", + "less-loader": "11.0.0", + "lint-staged": "^13.0.3", "path-browserify": "^1.0.1", "postcss-html": "^1.4.1", "postcss-less": "^6.0.0", - "prettier": "^2.6.2", + "prettier": "^2.7.1", + "pretty-quick": "^3.1.3", "regenerator-runtime": "^0.13.9", "speed-measure-webpack-plugin": "^1.5.0", "stylelint": "^14.9.1", @@ -94,10 +97,10 @@ "stylelint-config-standard": "^26.0.0", "stylelint-order": "^5.0.0", "svg-sprite-loader": "^6.0.11", - "typescript": "^4.7.3", + "typescript": "^4.7.4", "unplugin-vue-define-options": "^0.6.1", "vue-cli-plugin-windicss": "^1.1.4", - "vue-eslint-parser": "^9.0.2" + "vue-eslint-parser": "^9.0.3" }, "__npminstall_done": false, "repository": { @@ -123,10 +126,7 @@ "eslint --fix", "prettier --write" ], - "{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [ - "prettier --write--parser json" - ], - "package.json": [ + "*.json": [ "prettier --write" ], "*.vue": [ diff --git a/src/components/core/schema-form/src/schema-form-item.vue b/src/components/core/schema-form/src/schema-form-item.vue index 62da15772..3b33b0fd1 100644 --- a/src/components/core/schema-form/src/schema-form-item.vue +++ b/src/components/core/schema-form/src/schema-form-item.vue @@ -43,7 +43,7 @@