From ce19ea3fc0081dc66e67106bfcab5a5b8df73506 Mon Sep 17 00:00:00 2001 From: Antonio Anaya Date: Sun, 15 Feb 2026 01:03:29 -0600 Subject: [PATCH] ui_migration lint(fix): changes fixed with lint ecmaversion & es2021 --- webapp/.eslintrc.js | 29 +++++------- webapp/src/App.vue | 28 ++++++----- webapp/src/components/appContent.vue | 8 ++-- .../genericComponents/miniStreamDisplay.vue | 4 +- .../genericComponents/progressBar.vue | 2 + .../components/genericComponents/tabIcon.vue | 14 +++--- .../labThingsComponents/actionButton.vue | 47 +++++++++---------- .../labThingsComponents/actionLogDisplay.vue | 2 +- .../labThingsComponents/actionStatusModal.vue | 7 ++- .../labThingsComponents/inputFromSchema.vue | 15 +++--- .../labThingsComponents/propertyControl.vue | 9 ++-- .../serverSpecifiedActionButton.vue | 4 +- .../serverSpecifiedPropertyControl.vue | 2 +- .../syncPropertyButton.vue | 6 ++- webapp/src/components/loadingContent.vue | 5 +- .../modalComponents/calibrationWizard.vue | 2 + .../calibrationWizardTask.vue | 2 + .../cameraMainCalibrationStep.vue | 6 ++- .../cameraCalibrationTask.vue | 13 +++-- .../cameraStageMappingTask.vue | 9 +++- .../csmSteps/focusStep.vue | 2 +- .../csmSteps/runCsmStep.vue | 4 +- .../singleStepTask.vue | 7 ++- .../stepTemplateWithStream.vue | 2 +- .../aboutComponents/statusPane.vue | 4 +- .../tabContentComponents/aboutContent.vue | 2 +- .../paneBackgroundDetect.vue | 28 +++++------ .../backgroundDetectContent.vue | 2 +- .../controlComponents/autofocusControl.vue | 4 +- .../controlComponents/paneControl.vue | 2 +- .../controlComponents/positionControl.vue | 4 +- .../controlComponents/stageControlButtons.vue | 2 +- .../tabContentComponents/controlContent.vue | 2 +- .../tabContentComponents/loggingContent.vue | 4 +- .../openSeadragonViewer.vue | 6 +-- .../scanListComponents/scanCard.vue | 8 ++-- .../scanListComponents/scanViewer.vue | 4 +- .../tabContentComponents/scanListContent.vue | 11 ++--- .../settingsComponents/CSMSettings.vue | 2 +- .../CSMCalibrationSettings.vue | 6 ++- .../settingsComponents/cameraSettings.vue | 2 +- .../cameraCalibrationSettings.vue | 5 +- .../settingsComponents/displaySettings.vue | 2 +- .../settingsComponents/stageSettings.vue | 4 +- .../tabContentComponents/settingsContent.vue | 3 +- .../tabContentComponents/slideScanContent.vue | 41 +++++++++++----- .../tabContentComponents/streamContent.vue | 12 ++--- .../tabContentComponents/viewContent.vue | 1 - webapp/src/js_utils/formatter.mjs | 5 +- webapp/src/main.js | 4 +- webapp/src/mixins/labThingsMixins.js | 4 +- webapp/vite.config.mjs | 32 ++++++------- 52 files changed, 242 insertions(+), 193 deletions(-) diff --git a/webapp/.eslintrc.js b/webapp/.eslintrc.js index 72f9b826..4cce3865 100644 --- a/webapp/.eslintrc.js +++ b/webapp/.eslintrc.js @@ -2,25 +2,20 @@ module.exports = { root: true, env: { node: true, - es2021: true, // ✅ Updated for modern JS + es2021: true, }, parser: "vue-eslint-parser", parserOptions: { parser: "@babel/eslint-parser", requireConfigFile: false, - ecmaVersion: 2021, // ✅ Updated + ecmaVersion: 2021, sourceType: "module", }, - extends: [ - "plugin:vue/vue3-recommended", // ✅ Changed from vue/recommended to vue3-recommended - "eslint:recommended", - "@vue/prettier" - ], + extends: ["plugin:vue/vue3-recommended", "eslint:recommended", "@vue/prettier"], rules: { "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", - - // ✅ Vue 3 migration warnings - detect deprecated patterns + "vue/no-deprecated-slot-attribute": "warn", "vue/no-deprecated-v-on-native-modifier": "warn", "vue/no-deprecated-dollar-listeners-api": "warn", @@ -37,15 +32,13 @@ module.exports = { "vue/no-deprecated-v-is": "warn", "vue/no-lifecycle-after-await": "warn", "vue/no-watch-after-await": "warn", - - // ✅ Vue 3 best practices - "vue/require-explicit-emits": "warn", // Require emits declaration - "vue/multi-word-component-names": "warn", // Component naming - "vue/no-v-for-template-key-on-child": "error", // Key placement - "vue/no-v-model-argument": "off", // Allow v-model arguments (Vue 3 feature) - - // ✅ Relaxed for migration period (can be stricter later) + + "vue/require-explicit-emits": "warn", // Require emits declaration + "vue/multi-word-component-names": "warn", // Component naming + "vue/no-v-for-template-key-on-child": "error", // Key placement + "vue/no-v-model-argument": "error", // Allow v-model arguments (Vue 3 feature) + "vue/no-unused-components": "warn", "vue/no-unused-vars": "warn", }, -}; \ No newline at end of file +}; diff --git a/webapp/src/App.vue b/webapp/src/App.vue index 2bac1622..0254039d 100644 --- a/webapp/src/App.vue +++ b/webapp/src/App.vue @@ -1,4 +1,4 @@ -