From 583feae7b7c117f9e08eda956e8fc3095c3af8d1 Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Wed, 9 Apr 2025 05:49:15 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0`eslint`=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BE=9D=E8=B5=96=E5=B9=B6=E4=BD=9C=E5=85=BC=E5=AE=B9?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eslint.config.js | 33 +- mock/mine.ts | 2 +- package.json | 21 +- pnpm-lock.yaml | 301 ++++++++++-------- src/components/ReFlowChart/src/Control.vue | 2 +- src/components/ReFlowChart/src/NodePanel.vue | 4 +- src/components/ReSeamlessScroll/src/utils.ts | 4 + src/directives/ripple/index.ts | 4 +- .../lay-search/components/SearchFooter.vue | 2 +- .../components/SidebarCenterCollapse.vue | 2 +- .../components/SidebarLeftCollapse.vue | 2 +- .../components/SidebarTopCollapse.vue | 2 +- src/plugins/i18n.ts | 2 +- src/utils/print.ts | 2 + src/views/components/dialog/form.vue | 2 +- src/views/components/dialog/formPrimitive.vue | 2 +- src/views/components/drawer/form.vue | 2 +- src/views/components/drawer/formPrimitive.vue | 2 +- .../high/table-select/multiple/columns.tsx | 2 +- types/index.d.ts | 2 - types/router.d.ts | 2 +- types/shims-tsx.d.ts | 4 +- types/shims-vue.d.ts | 1 + 23 files changed, 210 insertions(+), 192 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 2d8abab40..a5be0cd52 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,11 +1,10 @@ import js from "@eslint/js"; +import tseslint from "typescript-eslint"; import pluginVue from "eslint-plugin-vue"; import * as parserVue from "vue-eslint-parser"; import configPrettier from "eslint-config-prettier"; import pluginPrettier from "eslint-plugin-prettier"; import { defineConfig, globalIgnores } from "eslint/config"; -import * as parserTypeScript from "@typescript-eslint/parser"; -import pluginTypeScript from "@typescript-eslint/eslint-plugin"; export default defineConfig([ globalIgnores([ @@ -20,7 +19,7 @@ export default defineConfig([ ...js.configs.recommended, languageOptions: { globals: { - // index.d.ts + // types/index.d.ts RefType: "readonly", EmitType: "readonly", TargetContext: "readonly", @@ -73,21 +72,10 @@ export default defineConfig([ ] } }, - { + ...tseslint.config({ + extends: [...tseslint.configs.recommended], files: ["**/*.?([cm])ts", "**/*.?([cm])tsx"], - languageOptions: { - parser: parserTypeScript, - parserOptions: { - sourceType: "module", - warnOnUnsupportedTypeScriptVersion: false - } - }, - plugins: { - "@typescript-eslint": pluginTypeScript - }, rules: { - ...pluginTypeScript.configs.strict.rules, - "@typescript-eslint/ban-types": "off", "@typescript-eslint/no-redeclare": "error", "@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/no-explicit-any": "off", @@ -114,20 +102,20 @@ export default defineConfig([ } ] } - }, + }), { files: ["**/*.d.ts"], rules: { "eslint-comments/no-unlimited-disable": "off", "import/no-duplicates": "off", + "no-restricted-syntax": "off", "unused-imports/no-unused-vars": "off" } }, { files: ["**/*.?([cm])js"], rules: { - "@typescript-eslint/no-require-imports": "off", - "@typescript-eslint/no-var-requires": "off" + "@typescript-eslint/no-require-imports": "off" } }, { @@ -148,18 +136,19 @@ export default defineConfig([ jsx: true }, extraFileExtensions: [".vue"], - parser: "@typescript-eslint/parser", + parser: tseslint.parser, sourceType: "module" } }, plugins: { + "@typescript-eslint": tseslint.plugin, vue: pluginVue }, processor: pluginVue.processors[".vue"], rules: { ...pluginVue.configs.base.rules, - ...pluginVue.configs["vue3-essential"].rules, - ...pluginVue.configs["vue3-recommended"].rules, + ...pluginVue.configs.essential.rules, + ...pluginVue.configs.recommended.rules, "no-undef": "off", "no-unused-vars": "off", "vue/no-v-html": "off", diff --git a/mock/mine.ts b/mock/mine.ts index 0f8966133..ed3fcb096 100644 --- a/mock/mine.ts +++ b/mock/mine.ts @@ -25,7 +25,7 @@ export default defineFakeRoute([ url: "/mine-logs", method: "get", response: () => { - let list = [ + const list = [ { id: 1, ip: faker.internet.ipv4(), diff --git a/package.json b/package.json index ac95cb5df..96bf18550 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "@commitlint/cli": "^19.7.1", "@commitlint/config-conventional": "^19.7.1", "@commitlint/types": "^19.5.0", - "@eslint/js": "^9.20.0", + "@eslint/js": "^9.24.0", "@faker-js/faker": "^9.5.0", "@iconify/json": "^2.2.319", "@iconify/vue": "4.2.0", @@ -132,8 +132,6 @@ "@types/qrcode": "^1.5.5", "@types/qs": "^6.9.18", "@types/sortablejs": "^1.15.8", - "@typescript-eslint/eslint-plugin": "^8.24.0", - "@typescript-eslint/parser": "^8.24.0", "@vitejs/plugin-vue": "^5.2.1", "@vitejs/plugin-vue-jsx": "^4.1.1", "autoprefixer": "^10.4.20", @@ -141,10 +139,10 @@ "code-inspector-plugin": "^0.20.0", "cssnano": "^7.0.6", "dagre": "^0.8.5", - "eslint": "^9.23.0", - "eslint-config-prettier": "^10.0.1", - "eslint-plugin-prettier": "^5.2.3", - "eslint-plugin-vue": "^9.32.0", + "eslint": "^9.24.0", + "eslint-config-prettier": "^10.1.1", + "eslint-plugin-prettier": "^5.2.6", + "eslint-plugin-vue": "^10.0.0", "gradient-string": "^3.0.0", "husky": "^9.1.7", "lint-staged": "^15.4.3", @@ -164,6 +162,7 @@ "svgo": "^3.3.2", "tailwindcss": "3.4.17", "typescript": "^5.7.3", + "typescript-eslint": "^8.29.1", "unplugin-icons": "^22.1.0", "vite": "^6.1.0", "vite-plugin-cdn-import": "^1.0.1", @@ -172,7 +171,7 @@ "vite-plugin-remove-console": "^2.2.0", "vite-plugin-router-warn": "^1.0.0", "vite-svg-loader": "^5.1.0", - "vue-eslint-parser": "^9.4.3", + "vue-eslint-parser": "^10.1.3", "vue-tsc": "^2.2.0" }, "engines": { @@ -183,6 +182,7 @@ "allowedDeprecatedVersions": { "are-we-there-yet": "*", "sourcemap-codec": "*", + "lodash.isequal": "*", "domexception": "*", "w3c-hr-time": "*", "inflight": "*", @@ -193,11 +193,6 @@ "abab": "*", "glob": "*" }, - "peerDependencyRules": { - "allowedVersions": { - "eslint": "9" - } - }, "onlyBuiltDependencies": [ "@parcel/watcher", "core-js", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d23c10bda..838b16ef2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -214,8 +214,8 @@ importers: specifier: ^19.5.0 version: 19.5.0 '@eslint/js': - specifier: ^9.20.0 - version: 9.20.0 + specifier: ^9.24.0 + version: 9.24.0 '@faker-js/faker': specifier: ^9.5.0 version: 9.5.0 @@ -227,7 +227,7 @@ importers: version: 4.2.0(vue@3.5.13(typescript@5.7.3)) '@intlify/unplugin-vue-i18n': specifier: ^6.0.3 - version: 6.0.3(@vue/compiler-dom@3.5.13)(eslint@9.23.0(jiti@2.4.2))(rollup@4.34.6)(typescript@5.7.3)(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3)))(vue@3.5.13(typescript@5.7.3)) + version: 6.0.3(@vue/compiler-dom@3.5.13)(eslint@9.24.0(jiti@2.4.2))(rollup@4.34.6)(typescript@5.7.3)(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3)))(vue@3.5.13(typescript@5.7.3)) '@types/codemirror': specifier: ^5.60.15 version: 5.60.15 @@ -258,12 +258,6 @@ importers: '@types/sortablejs': specifier: ^1.15.8 version: 1.15.8 - '@typescript-eslint/eslint-plugin': - specifier: ^8.24.0 - version: 8.24.0(@typescript-eslint/parser@8.24.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.23.0(jiti@2.4.2))(typescript@5.7.3) - '@typescript-eslint/parser': - specifier: ^8.24.0 - version: 8.24.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.7.3) '@vitejs/plugin-vue': specifier: ^5.2.1 version: 5.2.1(vite@6.1.0(@types/node@20.17.19)(jiti@2.4.2)(sass@1.85.0)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3)) @@ -286,17 +280,17 @@ importers: specifier: ^0.8.5 version: 0.8.5 eslint: - specifier: ^9.23.0 - version: 9.23.0(jiti@2.4.2) + specifier: ^9.24.0 + version: 9.24.0(jiti@2.4.2) eslint-config-prettier: - specifier: ^10.0.1 - version: 10.0.1(eslint@9.23.0(jiti@2.4.2)) + specifier: ^10.1.1 + version: 10.1.1(eslint@9.24.0(jiti@2.4.2)) eslint-plugin-prettier: - specifier: ^5.2.3 - version: 5.2.3(eslint-config-prettier@10.0.1(eslint@9.23.0(jiti@2.4.2)))(eslint@9.23.0(jiti@2.4.2))(prettier@3.5.1) + specifier: ^5.2.6 + version: 5.2.6(eslint-config-prettier@10.1.1(eslint@9.24.0(jiti@2.4.2)))(eslint@9.24.0(jiti@2.4.2))(prettier@3.5.1) eslint-plugin-vue: - specifier: ^9.32.0 - version: 9.32.0(eslint@9.23.0(jiti@2.4.2)) + specifier: ^10.0.0 + version: 10.0.0(eslint@9.24.0(jiti@2.4.2))(vue-eslint-parser@10.1.3(eslint@9.24.0(jiti@2.4.2))) gradient-string: specifier: ^3.0.0 version: 3.0.0 @@ -354,6 +348,9 @@ importers: typescript: specifier: ^5.7.3 version: 5.7.3 + typescript-eslint: + specifier: ^8.29.1 + version: 8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) unplugin-icons: specifier: ^22.1.0 version: 22.1.0(@vue/compiler-sfc@3.5.13) @@ -379,8 +376,8 @@ importers: specifier: ^5.1.0 version: 5.1.0(vue@3.5.13(typescript@5.7.3)) vue-eslint-parser: - specifier: ^9.4.3 - version: 9.4.3(eslint@9.23.0(jiti@2.4.2)) + specifier: ^10.1.3 + version: 10.1.3(eslint@9.24.0(jiti@2.4.2)) vue-tsc: specifier: ^2.2.0 version: 2.2.0(typescript@5.7.3) @@ -871,8 +868,8 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.19.2': - resolution: {integrity: sha512-GNKqxfHG2ySmJOBSHg7LxeUx4xpuCoFjacmlCoYWEbaPXLwvfIjixRI12xCQZeULksQb23uiA8F40w5TojpV7w==} + '@eslint/config-array@0.20.0': + resolution: {integrity: sha512-fxlS1kkIjx8+vy2SjuCB94q3htSNrufYTXubwiBFeaQHbH6Ipi43gFJq2zCMt6PHhImH3Xmr0NksKDvchWlpQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/config-helpers@0.2.0': @@ -887,12 +884,8 @@ packages: resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.20.0': - resolution: {integrity: sha512-iZA07H9io9Wn836aVTytRaNqh00Sad+EamwOVJT12GTLw1VGMFV/4JaME+JjLtr9fiGaoWgYnS54wrfWsSs4oQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@eslint/js@9.23.0': - resolution: {integrity: sha512-35MJ8vCPU0ZMxo7zfev2pypqTwWTofFZO6m4KAtdoFhRpLJUpHTZZ+KB3C7Hb1d7bULYwO4lJXGCi5Se+8OMbw==} + '@eslint/js@9.24.0': + resolution: {integrity: sha512-uIY/y3z0uvOGX8cp1C2fiC4+ZmBhp6yZWkojtHL1YEMnRt1Y63HB9TM17proGEmeG7HeUY+UP36F0aknKYTpYA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.6': @@ -1301,8 +1294,8 @@ packages: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@pkgr/core@0.1.1': - resolution: {integrity: sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==} + '@pkgr/core@0.2.1': + resolution: {integrity: sha512-VzgHzGblFmUeBmmrk55zPyrQIArQN4vujc9shWytaPdB3P7qhi0cpaiKIr7tlCmFv2lYUwnLospIqjL9ZSAhhg==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} '@popperjs/core@2.11.8': @@ -1572,53 +1565,71 @@ packages: '@types/yargs@16.0.9': resolution: {integrity: sha512-tHhzvkFXZQeTECenFoRljLBYPZJ7jAVxqqtEI0qTLOmuultnFp4I9yKE17vTuhf7BkhCu7I4XuemPgikDVuYqA==} - '@typescript-eslint/eslint-plugin@8.24.0': - resolution: {integrity: sha512-aFcXEJJCI4gUdXgoo/j9udUYIHgF23MFkg09LFz2dzEmU0+1Plk4rQWv/IYKvPHAtlkkGoB3m5e6oUp+JPsNaQ==} + '@typescript-eslint/eslint-plugin@8.29.1': + resolution: {integrity: sha512-ba0rr4Wfvg23vERs3eB+P3lfj2E+2g3lhWcCVukUuhtcdUx5lSIFZlGFEBHKr+3zizDa/TvZTptdNHVZWAkSBg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.8.0' + typescript: '>=4.8.4 <5.9.0' - '@typescript-eslint/parser@8.24.0': - resolution: {integrity: sha512-MFDaO9CYiard9j9VepMNa9MTcqVvSny2N4hkY6roquzj8pdCBRENhErrteaQuu7Yjn1ppk0v1/ZF9CG3KIlrTA==} + '@typescript-eslint/parser@8.29.1': + resolution: {integrity: sha512-zczrHVEqEaTwh12gWBIJWj8nx+ayDcCJs06yoNMY0kwjMWDM6+kppljY+BxWI06d2Ja+h4+WdufDcwMnnMEWmg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.8.0' + typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/scope-manager@8.24.0': resolution: {integrity: sha512-HZIX0UByphEtdVBKaQBgTDdn9z16l4aTUz8e8zPQnyxwHBtf5vtl1L+OhH+m1FGV9DrRmoDuYKqzVrvWDcDozw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.24.0': - resolution: {integrity: sha512-8fitJudrnY8aq0F1wMiPM1UUgiXQRJ5i8tFjq9kGfRajU+dbPyOuHbl0qRopLEidy0MwqgTHDt6CnSeXanNIwA==} + '@typescript-eslint/scope-manager@8.29.1': + resolution: {integrity: sha512-2nggXGX5F3YrsGN08pw4XpMLO1Rgtnn4AzTegC2MDesv6q3QaTU5yU7IbS1tf1IwCR0Hv/1EFygLn9ms6LIpDA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/type-utils@8.29.1': + resolution: {integrity: sha512-DkDUSDwZVCYN71xA4wzySqqcZsHKic53A4BLqmrWFFpOpNSoxX233lwGu/2135ymTCR04PoKiEEEvN1gFYg4Tw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.8.0' + typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/types@8.24.0': resolution: {integrity: sha512-VacJCBTyje7HGAw7xp11q439A+zeGG0p0/p2zsZwpnMzjPB5WteaWqt4g2iysgGFafrqvyLWqq6ZPZAOCoefCw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.29.1': + resolution: {integrity: sha512-VT7T1PuJF1hpYC3AGm2rCgJBjHL3nc+A/bhOp9sGMKfi5v0WufsX/sHCFBfNTx2F+zA6qBc/PD0/kLRLjdt8mQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.24.0': resolution: {integrity: sha512-ITjYcP0+8kbsvT9bysygfIfb+hBj6koDsu37JZG7xrCiy3fPJyNmfVtaGsgTUSEuTzcvME5YI5uyL5LD1EV5ZQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/utils@8.24.0': - resolution: {integrity: sha512-07rLuUBElvvEb1ICnafYWr4hk8/U7X9RDCOqd9JcAMtjh/9oRmcfN4yGzbPVirgMR0+HLVHehmu19CWeh7fsmQ==} + '@typescript-eslint/typescript-estree@8.29.1': + resolution: {integrity: sha512-l1enRoSaUkQxOQnbi0KPUtqeZkSiFlqrx9/3ns2rEDhGKfTa+88RmXqedC1zmVTOWrLc2e6DEJrTA51C9iLH5g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.9.0' + + '@typescript-eslint/utils@8.29.1': + resolution: {integrity: sha512-QAkFEbytSaB8wnmB+DflhUPz6CLbFWE2SnSCrRMEa+KnXIzDYbpsn++1HGvnfAsUY44doDXmvRkO5shlM/3UfA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.8.0' + typescript: '>=4.8.4 <5.9.0' '@typescript-eslint/visitor-keys@8.24.0': resolution: {integrity: sha512-kArLq83QxGLbuHrTMoOEWO+l2MwsNS2TGISEdx8xgqpkbytB07XmlQyQdNDrCc1ecSqx0cnmhGvpX+VBwqqSkg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.29.1': + resolution: {integrity: sha512-RGLh5CRaUEf02viP5c1Vh1cMGffQscyHe7HPAzGpfmfflFg1wUz2rYxd+OZqwpeypYvZ8UxSxuIpF++fmOzEcg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@uppy/companion-client@2.2.2': resolution: {integrity: sha512-5mTp2iq97/mYSisMaBtFRry6PTgZA6SIL7LePteOV5x0/DxKfrZW3DEiQERJmYpHzy7k8johpm2gHnEKto56Og==} @@ -2682,19 +2693,19 @@ packages: engines: {node: '>=6.0'} hasBin: true - eslint-config-prettier@10.0.1: - resolution: {integrity: sha512-lZBts941cyJyeaooiKxAtzoPHTN+GbQTJFAIdQbRhA4/8whaAraEh47Whw/ZFfrjNSnlAxqfm9i0XVAEkULjCw==} + eslint-config-prettier@10.1.1: + resolution: {integrity: sha512-4EQQr6wXwS+ZJSzaR5ZCrYgLxqvUjdXctaEtBqHcbkW944B1NQyO4qpdHQbXBONfwxXdkAY81HH4+LUfrg+zPw==} hasBin: true peerDependencies: eslint: '>=7.0.0' - eslint-plugin-prettier@5.2.3: - resolution: {integrity: sha512-qJ+y0FfCp/mQYQ/vWQ3s7eUlFEL4PyKfAJxsnYTJ4YT73nsJBWqmEpFryxV9OeUiqmsTsYJ5Y+KDNaeP31wrRw==} + eslint-plugin-prettier@5.2.6: + resolution: {integrity: sha512-mUcf7QG2Tjk7H055Jk0lGBjbgDnfrvqjhXh9t2xLMSCjZVcw9Rb1V6sVNXO0th3jgeO7zllWPTNRil3JW94TnQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: '@types/eslint': '>=8.0.0' eslint: '>=8.0.0' - eslint-config-prettier: '*' + eslint-config-prettier: '>= 7.0.0 <10.0.0 || >=10.1.0' prettier: '>=3.0.0' peerDependenciesMeta: '@types/eslint': @@ -2702,15 +2713,12 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-vue@9.32.0: - resolution: {integrity: sha512-b/Y05HYmnB/32wqVcjxjHZzNpwxj1onBOvqW89W+V+XNG1dRuaFbNd3vT9CLbr2LXjEoq+3vn8DanWf7XU22Ug==} - engines: {node: ^14.17.0 || >=16.0.0} + eslint-plugin-vue@10.0.0: + resolution: {integrity: sha512-XKckedtajqwmaX6u1VnECmZ6xJt+YvlmMzBPZd+/sI3ub2lpYZyFnsyWo7c3nMOQKJQudeyk1lw/JxdgeKT64w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^6.2.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 - - eslint-scope@7.2.2: - resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + eslint: ^8.57.0 || ^9.0.0 + vue-eslint-parser: ^10.0.0 eslint-scope@8.3.0: resolution: {integrity: sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==} @@ -2724,8 +2732,8 @@ packages: resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.23.0: - resolution: {integrity: sha512-jV7AbNoFPAY1EkFYpLq5bslU9NLNO8xnEeQXwErNibVryjk67wHVmddTBilc5srIttJDBrB0eMHKZBFbSIABCw==} + eslint@9.24.0: + resolution: {integrity: sha512-eh/jxIEJyZrvbWRe4XuVclLPDYSYYYgLy5zXGGxD6j8zjSAxFEzI2fL/8xNq6O2yKqVt+eF2YhV+hxjV6UKXwQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -3002,10 +3010,6 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - globals@13.24.0: - resolution: {integrity: sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==} - engines: {node: '>=8'} - globals@14.0.0: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} @@ -4851,8 +4855,8 @@ packages: symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - synckit@0.9.2: - resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} + synckit@0.11.3: + resolution: {integrity: sha512-szhWDqNNI9etJUvbZ1/cx1StnZx8yMmFxme48SwR4dty4ioSY50KEZlpv0qAfgc1fpRzuh9hBXEzoCpJ779dLg==} engines: {node: ^14.18.0 || >=16.0.0} table@6.9.0: @@ -4953,10 +4957,6 @@ packages: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} - type-fest@0.20.2: - resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} - engines: {node: '>=10'} - type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} @@ -4977,6 +4977,13 @@ packages: typeit@8.8.7: resolution: {integrity: sha512-sSVpy+cjeFP6Z+fZqiHzUSShg5yYFeJEt/Qut/bX945+Axyq+Yq+GPOuuk+sofoccSv8nNX/ibOOHkbki2mEpg==} + typescript-eslint@8.29.1: + resolution: {integrity: sha512-f8cDkvndhbQMPcysk6CUSGBWV+g1utqdn71P5YKwMumVMOG/5k7cHq0KyG4O52nB0oKS4aN2Tp5+wB4APJGC+w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '>=4.8.4 <5.9.0' + typescript@5.7.3: resolution: {integrity: sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw==} engines: {node: '>=14.17'} @@ -5170,11 +5177,11 @@ packages: '@vue/composition-api': optional: true - vue-eslint-parser@9.4.3: - resolution: {integrity: sha512-2rYRLWlIpaiN8xbPiDyXZXRgLGOtWxERV7ND5fFAv5qo1D2N9Fu9MNajBNc6o13lZ+24DAWCkQCvj4klgmcITg==} - engines: {node: ^14.17.0 || >=16.0.0} + vue-eslint-parser@10.1.3: + resolution: {integrity: sha512-dbCBnd2e02dYWsXoqX5yKUZlOt+ExIpq7hmHKPb5ZqKcjf++Eo0hMseFTZMLKThrUk61m+Uv6A2YSBve6ZvuDQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: '>=6.0.0' + eslint: ^8.57.0 || ^9.0.0 vue-i18n@11.1.1: resolution: {integrity: sha512-0P6DkKy96R4Wh2sIZJEHw8ivnlD1pnB6Ib/eldoF1SUpQutfKZv6aMqZwICS1gW0rwq24ZSXw7y3jW+PRVYqWA==} @@ -5934,14 +5941,14 @@ snapshots: '@esbuild/win32-x64@0.24.2': optional: true - '@eslint-community/eslint-utils@4.4.1(eslint@9.23.0(jiti@2.4.2))': + '@eslint-community/eslint-utils@4.4.1(eslint@9.24.0(jiti@2.4.2))': dependencies: - eslint: 9.23.0(jiti@2.4.2) + eslint: 9.24.0(jiti@2.4.2) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/config-array@0.19.2': + '@eslint/config-array@0.20.0': dependencies: '@eslint/object-schema': 2.1.6 debug: 4.4.0 @@ -5969,9 +5976,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.20.0': {} - - '@eslint/js@9.23.0': {} + '@eslint/js@9.24.0': {} '@eslint/object-schema@2.1.6': {} @@ -6078,9 +6083,9 @@ snapshots: '@intlify/shared@12.0.0-alpha.2': {} - '@intlify/unplugin-vue-i18n@6.0.3(@vue/compiler-dom@3.5.13)(eslint@9.23.0(jiti@2.4.2))(rollup@4.34.6)(typescript@5.7.3)(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3)))(vue@3.5.13(typescript@5.7.3))': + '@intlify/unplugin-vue-i18n@6.0.3(@vue/compiler-dom@3.5.13)(eslint@9.24.0(jiti@2.4.2))(rollup@4.34.6)(typescript@5.7.3)(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3)))(vue@3.5.13(typescript@5.7.3))': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.23.0(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.24.0(jiti@2.4.2)) '@intlify/bundle-utils': 10.0.0(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3))) '@intlify/shared': 11.1.3 '@intlify/vue-i18n-extensions': 8.0.0(@intlify/shared@11.1.3)(@vue/compiler-dom@3.5.13)(vue-i18n@11.1.1(vue@3.5.13(typescript@5.7.3)))(vue@3.5.13(typescript@5.7.3)) @@ -6471,7 +6476,7 @@ snapshots: '@pkgjs/parseargs@0.11.0': optional: true - '@pkgr/core@0.1.1': {} + '@pkgr/core@0.2.1': {} '@popperjs/core@2.11.8': {} @@ -6684,15 +6689,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.24.0(@typescript-eslint/parser@8.24.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.23.0(jiti@2.4.2))(typescript@5.7.3)': + '@typescript-eslint/eslint-plugin@8.29.1(@typescript-eslint/parser@8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.24.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.7.3) - '@typescript-eslint/scope-manager': 8.24.0 - '@typescript-eslint/type-utils': 8.24.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.7.3) - '@typescript-eslint/utils': 8.24.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.7.3) - '@typescript-eslint/visitor-keys': 8.24.0 - eslint: 9.23.0(jiti@2.4.2) + '@typescript-eslint/parser': 8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/scope-manager': 8.29.1 + '@typescript-eslint/type-utils': 8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/utils': 8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 8.29.1 + eslint: 9.24.0(jiti@2.4.2) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -6701,14 +6706,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.24.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.7.3)': + '@typescript-eslint/parser@8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: - '@typescript-eslint/scope-manager': 8.24.0 - '@typescript-eslint/types': 8.24.0 - '@typescript-eslint/typescript-estree': 8.24.0(typescript@5.7.3) - '@typescript-eslint/visitor-keys': 8.24.0 + '@typescript-eslint/scope-manager': 8.29.1 + '@typescript-eslint/types': 8.29.1 + '@typescript-eslint/typescript-estree': 8.29.1(typescript@5.7.3) + '@typescript-eslint/visitor-keys': 8.29.1 debug: 4.4.0 - eslint: 9.23.0(jiti@2.4.2) + eslint: 9.24.0(jiti@2.4.2) typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -6718,12 +6723,17 @@ snapshots: '@typescript-eslint/types': 8.24.0 '@typescript-eslint/visitor-keys': 8.24.0 - '@typescript-eslint/type-utils@8.24.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.7.3)': + '@typescript-eslint/scope-manager@8.29.1': dependencies: - '@typescript-eslint/typescript-estree': 8.24.0(typescript@5.7.3) - '@typescript-eslint/utils': 8.24.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/types': 8.29.1 + '@typescript-eslint/visitor-keys': 8.29.1 + + '@typescript-eslint/type-utils@8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3)': + dependencies: + '@typescript-eslint/typescript-estree': 8.29.1(typescript@5.7.3) + '@typescript-eslint/utils': 8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) debug: 4.4.0 - eslint: 9.23.0(jiti@2.4.2) + eslint: 9.24.0(jiti@2.4.2) ts-api-utils: 2.0.1(typescript@5.7.3) typescript: 5.7.3 transitivePeerDependencies: @@ -6731,6 +6741,8 @@ snapshots: '@typescript-eslint/types@8.24.0': {} + '@typescript-eslint/types@8.29.1': {} + '@typescript-eslint/typescript-estree@8.24.0(typescript@5.7.3)': dependencies: '@typescript-eslint/types': 8.24.0 @@ -6745,13 +6757,27 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.24.0(eslint@9.23.0(jiti@2.4.2))(typescript@5.7.3)': + '@typescript-eslint/typescript-estree@8.29.1(typescript@5.7.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.23.0(jiti@2.4.2)) - '@typescript-eslint/scope-manager': 8.24.0 - '@typescript-eslint/types': 8.24.0 - '@typescript-eslint/typescript-estree': 8.24.0(typescript@5.7.3) - eslint: 9.23.0(jiti@2.4.2) + '@typescript-eslint/types': 8.29.1 + '@typescript-eslint/visitor-keys': 8.29.1 + debug: 4.4.0 + fast-glob: 3.3.3 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.7.1 + ts-api-utils: 2.0.1(typescript@5.7.3) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.24.0(jiti@2.4.2)) + '@typescript-eslint/scope-manager': 8.29.1 + '@typescript-eslint/types': 8.29.1 + '@typescript-eslint/typescript-estree': 8.29.1(typescript@5.7.3) + eslint: 9.24.0(jiti@2.4.2) typescript: 5.7.3 transitivePeerDependencies: - supports-color @@ -6761,6 +6787,11 @@ snapshots: '@typescript-eslint/types': 8.24.0 eslint-visitor-keys: 4.2.0 + '@typescript-eslint/visitor-keys@8.29.1': + dependencies: + '@typescript-eslint/types': 8.29.1 + eslint-visitor-keys: 4.2.0 + '@uppy/companion-client@2.2.2': dependencies: '@uppy/utils': 4.1.3 @@ -8047,37 +8078,29 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-config-prettier@10.0.1(eslint@9.23.0(jiti@2.4.2)): + eslint-config-prettier@10.1.1(eslint@9.24.0(jiti@2.4.2)): dependencies: - eslint: 9.23.0(jiti@2.4.2) + eslint: 9.24.0(jiti@2.4.2) - eslint-plugin-prettier@5.2.3(eslint-config-prettier@10.0.1(eslint@9.23.0(jiti@2.4.2)))(eslint@9.23.0(jiti@2.4.2))(prettier@3.5.1): + eslint-plugin-prettier@5.2.6(eslint-config-prettier@10.1.1(eslint@9.24.0(jiti@2.4.2)))(eslint@9.24.0(jiti@2.4.2))(prettier@3.5.1): dependencies: - eslint: 9.23.0(jiti@2.4.2) + eslint: 9.24.0(jiti@2.4.2) prettier: 3.5.1 prettier-linter-helpers: 1.0.0 - synckit: 0.9.2 + synckit: 0.11.3 optionalDependencies: - eslint-config-prettier: 10.0.1(eslint@9.23.0(jiti@2.4.2)) + eslint-config-prettier: 10.1.1(eslint@9.24.0(jiti@2.4.2)) - eslint-plugin-vue@9.32.0(eslint@9.23.0(jiti@2.4.2)): + eslint-plugin-vue@10.0.0(eslint@9.24.0(jiti@2.4.2))(vue-eslint-parser@10.1.3(eslint@9.24.0(jiti@2.4.2))): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.23.0(jiti@2.4.2)) - eslint: 9.23.0(jiti@2.4.2) - globals: 13.24.0 + '@eslint-community/eslint-utils': 4.4.1(eslint@9.24.0(jiti@2.4.2)) + eslint: 9.24.0(jiti@2.4.2) natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.1.2 semver: 7.7.1 - vue-eslint-parser: 9.4.3(eslint@9.23.0(jiti@2.4.2)) + vue-eslint-parser: 10.1.3(eslint@9.24.0(jiti@2.4.2)) xml-name-validator: 4.0.0 - transitivePeerDependencies: - - supports-color - - eslint-scope@7.2.2: - dependencies: - esrecurse: 4.3.0 - estraverse: 5.3.0 eslint-scope@8.3.0: dependencies: @@ -8088,15 +8111,15 @@ snapshots: eslint-visitor-keys@4.2.0: {} - eslint@9.23.0(jiti@2.4.2): + eslint@9.24.0(jiti@2.4.2): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.23.0(jiti@2.4.2)) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.24.0(jiti@2.4.2)) '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.19.2 + '@eslint/config-array': 0.20.0 '@eslint/config-helpers': 0.2.0 '@eslint/core': 0.12.0 '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.23.0 + '@eslint/js': 9.24.0 '@eslint/plugin-kit': 0.2.7 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 @@ -8436,10 +8459,6 @@ snapshots: globals@11.12.0: {} - globals@13.24.0: - dependencies: - type-fest: 0.20.2 - globals@14.0.0: {} globals@15.15.0: {} @@ -10462,9 +10481,9 @@ snapshots: symbol-tree@3.2.4: {} - synckit@0.9.2: + synckit@0.11.3: dependencies: - '@pkgr/core': 0.1.1 + '@pkgr/core': 0.2.1 tslib: 2.8.1 table@6.9.0: @@ -10592,8 +10611,6 @@ snapshots: type-detect@4.0.8: {} - type-fest@0.20.2: {} - type-fest@0.21.3: {} type-fest@4.34.1: {} @@ -10610,6 +10627,16 @@ snapshots: dependencies: '@types/web-animations-js': 2.2.16 + typescript-eslint@8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.29.1(@typescript-eslint/parser@8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/parser': 8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + '@typescript-eslint/utils': 8.29.1(eslint@9.24.0(jiti@2.4.2))(typescript@5.7.3) + eslint: 9.24.0(jiti@2.4.2) + typescript: 5.7.3 + transitivePeerDependencies: + - supports-color + typescript@5.7.3: {} ufo@1.5.4: {} @@ -10799,13 +10826,13 @@ snapshots: dependencies: vue: 3.5.13(typescript@5.7.3) - vue-eslint-parser@9.4.3(eslint@9.23.0(jiti@2.4.2)): + vue-eslint-parser@10.1.3(eslint@9.24.0(jiti@2.4.2)): dependencies: debug: 4.4.0 - eslint: 9.23.0(jiti@2.4.2) - eslint-scope: 7.2.2 - eslint-visitor-keys: 3.4.3 - espree: 9.6.1 + eslint: 9.24.0(jiti@2.4.2) + eslint-scope: 8.3.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 esquery: 1.6.0 lodash: 4.17.21 semver: 7.7.1 diff --git a/src/components/ReFlowChart/src/Control.vue b/src/components/ReFlowChart/src/Control.vue index e0f46fb8a..2a1b38765 100644 --- a/src/components/ReFlowChart/src/Control.vue +++ b/src/components/ReFlowChart/src/Control.vue @@ -3,7 +3,7 @@ import { ref, unref, onMounted } from "vue"; import { LogicFlow } from "@logicflow/core"; interface Props { - lf: LogicFlow; + lf?: LogicFlow; catTurboData?: boolean; } diff --git a/src/components/ReFlowChart/src/NodePanel.vue b/src/components/ReFlowChart/src/NodePanel.vue index 53d0d5c1f..674542cb2 100644 --- a/src/components/ReFlowChart/src/NodePanel.vue +++ b/src/components/ReFlowChart/src/NodePanel.vue @@ -9,8 +9,8 @@ type nodeListType = { }; interface Props { - lf: LogicFlow; - nodeList: Array; + lf?: LogicFlow; + nodeList?: Array; } const props = withDefaults(defineProps(), { diff --git a/src/components/ReSeamlessScroll/src/utils.ts b/src/components/ReSeamlessScroll/src/utils.ts index 47934c938..9b6725379 100644 --- a/src/components/ReSeamlessScroll/src/utils.ts +++ b/src/components/ReSeamlessScroll/src/utils.ts @@ -60,12 +60,15 @@ export function copyObj() { copyIsArray, clone, i = 1, + // eslint-disable-next-line prefer-rest-params target = arguments[0] || {}, // 使用||运算符,排除隐式强制类型转换为false的数据类型 deep = false, + // eslint-disable-next-line prefer-const len = arguments.length; if (typeof target === "boolean") { deep = target; + // eslint-disable-next-line prefer-rest-params target = arguments[1] || {}; i++; } @@ -79,6 +82,7 @@ export function copyObj() { for (; i < len; i++) { //所以如果源对象中数据类型为Undefined或Null那么就会跳过本次循环,接着循环下一个源对象 + // eslint-disable-next-line prefer-rest-params if ((options = arguments[i]) != null) { // 如果遇到源对象的数据类型为Boolean, Number for in循环会被跳过,不执行for in循环// src用于判断target对象是否存在name属性 for (name in options) { diff --git a/src/directives/ripple/index.ts b/src/directives/ripple/index.ts index 3fd94d9cf..8aef2d17b 100644 --- a/src/directives/ripple/index.ts +++ b/src/directives/ripple/index.ts @@ -32,8 +32,8 @@ const calculate = ( const offset = el.getBoundingClientRect(); // 获取点击位置距离 el 的垂直和水平距离 - let localX = e.clientX - offset.left; - let localY = e.clientY - offset.top; + const localX = e.clientX - offset.left; + const localY = e.clientY - offset.top; let radius = 0; let scale = 0.3; diff --git a/src/layout/components/lay-search/components/SearchFooter.vue b/src/layout/components/lay-search/components/SearchFooter.vue index 17be4c8be..301c0525d 100644 --- a/src/layout/components/lay-search/components/SearchFooter.vue +++ b/src/layout/components/lay-search/components/SearchFooter.vue @@ -6,7 +6,7 @@ import EnterOutlined from "@/assets/svg/enter_outlined.svg?component"; import ArrowUpLine from "~icons/ri/arrow-up-line"; import ArrowDownLine from "~icons/ri/arrow-down-line"; -withDefaults(defineProps<{ total: number }>(), { +withDefaults(defineProps<{ total?: number }>(), { total: 0 }); diff --git a/src/layout/components/lay-sidebar/components/SidebarCenterCollapse.vue b/src/layout/components/lay-sidebar/components/SidebarCenterCollapse.vue index 8aba97f3d..7f76b96ff 100644 --- a/src/layout/components/lay-sidebar/components/SidebarCenterCollapse.vue +++ b/src/layout/components/lay-sidebar/components/SidebarCenterCollapse.vue @@ -7,7 +7,7 @@ import { useNav } from "@/layout/hooks/useNav"; import ArrowLeft from "~icons/ri/arrow-left-double-fill"; interface Props { - isActive: boolean; + isActive?: boolean; } withDefaults(defineProps(), { diff --git a/src/layout/components/lay-sidebar/components/SidebarLeftCollapse.vue b/src/layout/components/lay-sidebar/components/SidebarLeftCollapse.vue index 32ea646f1..2e62b74e8 100644 --- a/src/layout/components/lay-sidebar/components/SidebarLeftCollapse.vue +++ b/src/layout/components/lay-sidebar/components/SidebarLeftCollapse.vue @@ -7,7 +7,7 @@ import { useNav } from "@/layout/hooks/useNav"; import MenuFold from "~icons/ri/menu-fold-fill"; interface Props { - isActive: boolean; + isActive?: boolean; } withDefaults(defineProps(), { diff --git a/src/layout/components/lay-sidebar/components/SidebarTopCollapse.vue b/src/layout/components/lay-sidebar/components/SidebarTopCollapse.vue index 0461b1636..3370e368e 100644 --- a/src/layout/components/lay-sidebar/components/SidebarTopCollapse.vue +++ b/src/layout/components/lay-sidebar/components/SidebarTopCollapse.vue @@ -4,7 +4,7 @@ import MenuFold from "~icons/ri/menu-fold-fill"; import MenuUnfold from "~icons/ri/menu-unfold-fill"; interface Props { - isActive: boolean; + isActive?: boolean; } withDefaults(defineProps(), { diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts index 0615cf80c..fca2e7254 100644 --- a/src/plugins/i18n.ts +++ b/src/plugins/i18n.ts @@ -10,7 +10,7 @@ import zhLocale from "element-plus/es/locale/lang/zh-cn"; const siphonI18n = (function () { // 仅初始化一次国际化配置 - let cache = Object.fromEntries( + const cache = Object.fromEntries( Object.entries( import.meta.glob("../../locales/*.y(a)?ml", { eager: true }) ).map(([key, value]: any) => { diff --git a/src/utils/print.ts b/src/utils/print.ts index 5f6db1805..ce005d54d 100644 --- a/src/utils/print.ts +++ b/src/utils/print.ts @@ -140,8 +140,10 @@ Print.prototype = { "position:absolute;width:0;height:0;top:-10px;left:-10px;" ); + // eslint-disable-next-line prefer-const w = f.contentWindow || f.contentDocument; + // eslint-disable-next-line prefer-const doc = f.contentDocument || f.contentWindow.document; doc.open(); doc.write(content); diff --git a/src/views/components/dialog/form.vue b/src/views/components/dialog/form.vue index f5383d6a4..f823c97e0 100644 --- a/src/views/components/dialog/form.vue +++ b/src/views/components/dialog/form.vue @@ -3,7 +3,7 @@ import { ref } from "vue"; // 声明 props 类型 export interface FormProps { - formInline: { + formInline?: { user: string; region: string; }; diff --git a/src/views/components/dialog/formPrimitive.vue b/src/views/components/dialog/formPrimitive.vue index af4bc34c5..8bf487155 100644 --- a/src/views/components/dialog/formPrimitive.vue +++ b/src/views/components/dialog/formPrimitive.vue @@ -3,7 +3,7 @@ import { useVModel } from "@vueuse/core"; // 声明 props 类型 export interface FormProps { - data: string; + data?: string; } // 声明 props 默认值 diff --git a/src/views/components/drawer/form.vue b/src/views/components/drawer/form.vue index f5383d6a4..f823c97e0 100644 --- a/src/views/components/drawer/form.vue +++ b/src/views/components/drawer/form.vue @@ -3,7 +3,7 @@ import { ref } from "vue"; // 声明 props 类型 export interface FormProps { - formInline: { + formInline?: { user: string; region: string; }; diff --git a/src/views/components/drawer/formPrimitive.vue b/src/views/components/drawer/formPrimitive.vue index af4bc34c5..8bf487155 100644 --- a/src/views/components/drawer/formPrimitive.vue +++ b/src/views/components/drawer/formPrimitive.vue @@ -3,7 +3,7 @@ import { useVModel } from "@vueuse/core"; // 声明 props 类型 export interface FormProps { - data: string; + data?: string; } // 声明 props 默认值 diff --git a/src/views/table/high/table-select/multiple/columns.tsx b/src/views/table/high/table-select/multiple/columns.tsx index e024a49a6..4341ed091 100644 --- a/src/views/table/high/table-select/multiple/columns.tsx +++ b/src/views/table/high/table-select/multiple/columns.tsx @@ -73,7 +73,7 @@ export function useColumns(selectRef: Ref, formRef: Ref, tableRef: Ref) { const onSearch = () => { tableData.value = cloneTableData; if (!isAllEmpty(searchForm.sexValue)) { - let sex = sexOptions + const sex = sexOptions .map(sex => sex.value === Number(searchForm.sexValue) && sex.label) .filter(Boolean)[0]; tableData.value = tableData.value.filter(data => data.sex === sex); diff --git a/types/index.d.ts b/types/index.d.ts index 67d7459e8..404601a3e 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -75,8 +75,6 @@ interface ComponentElRef { $el: T; } -// eslint-disable-next-line @typescript-eslint/no-unused-vars function parseInt(s: string | number, radix?: number): number; -// eslint-disable-next-line @typescript-eslint/no-unused-vars function parseFloat(string: string | number): number; diff --git a/types/router.d.ts b/types/router.d.ts index c0f3eaf07..035585244 100644 --- a/types/router.d.ts +++ b/types/router.d.ts @@ -104,6 +104,6 @@ declare global { // https://router.vuejs.org/zh/guide/advanced/meta.html#typescript declare module "vue-router" { - // eslint-disable-next-line @typescript-eslint/no-empty-object-type + // eslint-disable-next-line interface RouteMeta extends CustomizeRouteMeta {} } diff --git a/types/shims-tsx.d.ts b/types/shims-tsx.d.ts index 199f97935..fb9ce9717 100644 --- a/types/shims-tsx.d.ts +++ b/types/shims-tsx.d.ts @@ -1,4 +1,4 @@ -import Vue, { VNode } from "vue"; +import type Vue, { type VNode } from "vue"; declare module "*.tsx" { import Vue from "compatible-vue"; @@ -7,7 +7,9 @@ declare module "*.tsx" { declare global { namespace JSX { + // eslint-disable-next-line interface Element extends VNode {} + // eslint-disable-next-line interface ElementClass extends Vue {} interface ElementAttributesProperty { $props: any; diff --git a/types/shims-vue.d.ts b/types/shims-vue.d.ts index ccdc4dd9d..8927f5405 100644 --- a/types/shims-vue.d.ts +++ b/types/shims-vue.d.ts @@ -1,5 +1,6 @@ declare module "*.vue" { import type { DefineComponent } from "vue"; + // eslint-disable-next-line const component: DefineComponent<{}, {}, any>; export default component; }