From 150a3118f2556ff3b71331a3f5eb7145a16a118c Mon Sep 17 00:00:00 2001 From: LiLongLong <13717757313@163.com> Date: Sat, 11 Jan 2025 11:10:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E7=BC=96=E7=A0=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.ts | 7 ++ components.d.ts | 5 + package.json | 4 +- src/components/Keyboard.vue | 9 +- src/components/dialogs/ErrorModal.vue | 24 ++--- src/mock/Index/Running.ts | 1 + src/pages/Index/Index.vue | 69 ++++++++---- src/pages/Index/Regular.vue | 2 +- src/pages/Index/Regular/Emergency.vue | 30 +++--- src/pages/Index/Regular/Running.vue | 9 +- src/pages/Index/Regular/TestTube.vue | 2 +- src/pages/Index/Settings/Users.vue | 2 +- src/pages/Index/TestTube/TubeUserId.vue | 2 +- .../Index/components/Consumables/IdCardInfo.vue | 4 +- .../components/Consumables/MoveLiquidArea.vue | 20 +++- .../Index/components/Consumables/Warn/InitWarn.vue | 4 +- .../components/Running/EmergencyResultDialog.vue | 26 ++--- .../Index/components/Running/SampleDisplay.vue | 2 +- src/router/router.ts | 10 +- src/types/Index/Running.ts | 2 +- src/types/Index/TestTube.ts | 3 +- src/utils/getServerInfo.ts | 3 +- tsconfig.app.tsbuildinfo | 119 +-------------------- tsconfig.json | 3 +- tsconfig.node.tsbuildinfo | 2 +- 25 files changed, 161 insertions(+), 203 deletions(-) diff --git a/.eslintrc.ts b/.eslintrc.ts index 3c8d68c..e16456c 100644 --- a/.eslintrc.ts +++ b/.eslintrc.ts @@ -14,5 +14,12 @@ module.exports = { }, rules: { // 你可以在这里添加或修改 ESLint 规则 + '@typescript-eslint/no-unused-vars': ['error', { + args: 'none', // 不检查函数参数是否被使用 + vars: 'exceptDestructuring', // 检查所有变量是否被使用 + varsIgnorePattern: '^_', // 忽略以 "_" 开头的变量 + argsIgnorePattern: '^_', // 忽略以 "_" 开头的参数 + destructuredArrayIgnorePattern: '^_' // 忽略以 "_" 开头的解构数组成员 + }], }, }; diff --git a/components.d.ts b/components.d.ts index 461e21b..04ca081 100644 --- a/components.d.ts +++ b/components.d.ts @@ -9,12 +9,17 @@ declare module 'vue' { export interface GlobalComponents { ElButton: typeof import('element-plus/es')['ElButton'] ElCol: typeof import('element-plus/es')['ElCol'] + ElDropdown: typeof import('element-plus/es')['ElDropdown'] + ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] + ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElFooter: typeof import('element-plus/es')['ElFooter'] ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElInput: typeof import('element-plus/es')['ElInput'] ElPopover: typeof import('element-plus/es')['ElPopover'] ElRow: typeof import('element-plus/es')['ElRow'] + ElTable: typeof import('element-plus/es')['ElTable'] + ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ErrorModal: typeof import('./src/components/dialogs/ErrorModal.vue')['default'] Keyboard: typeof import('./src/components/Keyboard.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/package.json b/package.json index 1845897..60d4ba1 100644 --- a/package.json +++ b/package.json @@ -38,10 +38,10 @@ "@vitejs/plugin-vue": "^5.1.4", "@vue/compiler-sfc": "^3.5.12", "autoprefixer": "^10.4.20", - "eslint": "^9.12.0", + "eslint": "^9.17.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.2.1", - "eslint-plugin-vue": "^9.29.0", + "eslint-plugin-vue": "^9.32.0", "jest": "^29.7.0", "postcss-pxtorem": "^6.1.0", "prettier": "^3.3.3", diff --git a/src/components/Keyboard.vue b/src/components/Keyboard.vue index f313e80..9004a85 100644 --- a/src/components/Keyboard.vue +++ b/src/components/Keyboard.vue @@ -1,7 +1,7 @@