This is an automated email from the ASF dual-hosted git repository.

jinsongzhou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/amoro.git


The following commit(s) were added to refs/heads/master by this push:
     new f04462a7b [AMORO-2852]: fix eslint error & ts (#2868)
f04462a7b is described below

commit f04462a7bab3868de4e1997fc6e3e3fea56c44fd
Author: xiaomo <[email protected]>
AuthorDate: Tue May 28 10:34:19 2024 +0800

    [AMORO-2852]: fix eslint error & ts (#2868)
---
 amoro-ams/amoro-ams-dashboard/package.json                |  1 +
 .../src/components/VirtualRecycleScroller.vue             |  2 +-
 .../src/components/loading/loading.vue                    | 15 ---------------
 .../src/components/sql-editor/index.vue                   |  2 +-
 amoro-ams/amoro-ams-dashboard/src/main.ts                 |  4 ++--
 amoro-ams/amoro-ams-dashboard/src/utils/editor.ts         |  2 +-
 6 files changed, 6 insertions(+), 20 deletions(-)

diff --git a/amoro-ams/amoro-ams-dashboard/package.json 
b/amoro-ams/amoro-ams-dashboard/package.json
index ae94bab80..6ce729a92 100644
--- a/amoro-ams/amoro-ams-dashboard/package.json
+++ b/amoro-ams/amoro-ams-dashboard/package.json
@@ -7,6 +7,7 @@
     "dev:mock": "vite --mode mock",
     "build": "vite build && node ./license.node.js",
     "preview": "vite preview",
+    "tslint": "npx vue-tsc --noEmit",
     "lint": "eslint src/**/*.{js,ts,vue} --fix"
   },
   "dependencies": {
diff --git 
a/amoro-ams/amoro-ams-dashboard/src/components/VirtualRecycleScroller.vue 
b/amoro-ams/amoro-ams-dashboard/src/components/VirtualRecycleScroller.vue
index 1e4bf4241..d6d91ae24 100644
--- a/amoro-ams/amoro-ams-dashboard/src/components/VirtualRecycleScroller.vue
+++ b/amoro-ams/amoro-ams-dashboard/src/components/VirtualRecycleScroller.vue
@@ -27,7 +27,7 @@
   >
     <div :class="{'active': activeItem === item.label, 'hive-table': item.type 
=== 'HIVE'}" @mouseenter="handleMouseEnter(item)" 
@click="handleClickTable(item)" class="desc">
       <svg-icon v-if="iconName === 'database'" icon-class="database" 
class="table-icon g-mr-8" />
-      <svg-icon v-else :icon-class="tableTypeIconMap[item.type]" 
class="table-icon g-mr-8" />
+      <svg-icon v-else :icon-class="tableTypeIconMap[item.type as keyof typeof 
tableTypeIconMap]" class="table-icon g-mr-8" />
       <p :title="item.label" class="name g-text-nowrap">
         {{ item.label }}
       </p>
diff --git a/amoro-ams/amoro-ams-dashboard/src/components/loading/loading.vue 
b/amoro-ams/amoro-ams-dashboard/src/components/loading/loading.vue
index 8d4b93e28..17dda6d71 100644
--- a/amoro-ams/amoro-ams-dashboard/src/components/loading/loading.vue
+++ b/amoro-ams/amoro-ams-dashboard/src/components/loading/loading.vue
@@ -19,17 +19,6 @@
 <script setup lang="ts">
 import { onBeforeUnmount, ref } from 'vue'
 
-// name: 'ULoading',
-// props: {
-//   loadingText: {
-//     type: String,
-//     default: 'Loading'
-//   },
-//   fullscreen: {
-//     type: Boolean,
-//     default: false
-//   }
-// },
 const props = defineProps({
   loadingText: {
     type: String,
@@ -42,10 +31,6 @@ const props = defineProps({
 })
 const visible = ref<boolean>(true)
 
-const hide = () => {
-  visible.value = false
-}
-
 onBeforeUnmount(() => {
   visible.value = false;
 })
diff --git a/amoro-ams/amoro-ams-dashboard/src/components/sql-editor/index.vue 
b/amoro-ams/amoro-ams-dashboard/src/components/sql-editor/index.vue
index 61a6ae924..8166d6a79 100644
--- a/amoro-ams/amoro-ams-dashboard/src/components/sql-editor/index.vue
+++ b/amoro-ams/amoro-ams-dashboard/src/components/sql-editor/index.vue
@@ -101,7 +101,7 @@ onMounted(() => {
 
     newEditor.setValue(props.sqlValue || '')
 
-    newEditor.onDidChangeModelContent(e => {
+    newEditor.onDidChangeModelContent(() => {
       const val = editor.getValue()
       emit('update:value', val)
       emit('change', val)
diff --git a/amoro-ams/amoro-ams-dashboard/src/main.ts 
b/amoro-ams/amoro-ams-dashboard/src/main.ts
index 5484b7953..9ec3db74e 100644
--- a/amoro-ams/amoro-ams-dashboard/src/main.ts
+++ b/amoro-ams/amoro-ams-dashboard/src/main.ts
@@ -50,9 +50,9 @@ RegisterComponents(app);
     const fromQuery = window.location.search
     if (!store.historyPathInfo.path && fromPath!='/login') {
       const queryParams = new URLSearchParams(fromQuery)
-      const queryObj = {}
+      const queryObj: Record<string, string> = {}
       for (const [key, value] of queryParams.entries()) {
-          queryObj[key] = value
+          queryObj[key as string] = value
       }
       store.setHistoryPath({
         path: fromPath,
diff --git a/amoro-ams/amoro-ams-dashboard/src/utils/editor.ts 
b/amoro-ams/amoro-ams-dashboard/src/utils/editor.ts
index 633e7be77..b3b82f9ca 100644
--- a/amoro-ams/amoro-ams-dashboard/src/utils/editor.ts
+++ b/amoro-ams/amoro-ams-dashboard/src/utils/editor.ts
@@ -27,7 +27,7 @@ import sqlFormatter from 'sql-formatter'
 const registerSql = () => {
   // SQL keyword hints
   monaco.languages.registerCompletionItemProvider('sql', {
-    provideCompletionItems: (model, position, context, token) => {
+    provideCompletionItems: (model, position) => {
       const textUntilPosition = model.getValueInRange({
         startLineNumber: position.lineNumber,
         startColumn: 1,

Reply via email to