Browse Source

chore: resolve lint errors

jamesgeorge007 1 month ago
parent
commit
e96232133d

+ 27 - 27
packages/hoppscotch-common/src/components/graphql/ExplorerSection.vue

@@ -11,16 +11,16 @@
 </template>
 
 <script setup lang="ts">
-import IconArgument from "~icons/lucide/diamond-minus"
-import IconDeprecatedArgument from "~icons/lucide/diamond-minus"
-import IconDeprecatedEnumValue from "~icons/lucide/diamond-minus"
-import IconDeprecatedField from "~icons/lucide/diamond-minus"
-import IconDierctive from "~icons/lucide/arrow-right"
-import IconEnumValue from "~icons/lucide/arrow-right"
-import IconField from "~icons/lucide/rectangle-ellipsis"
-import IconImplements from "~icons/lucide/arrow-right"
-import IconType from "~icons/lucide/file-type"
-import IconRootTypes from "~icons/lucide/folder-kanban"
+// import IconArgument from "~icons/lucide/diamond-minus"
+// import IconDeprecatedArgument from "~icons/lucide/diamond-minus"
+// import IconDeprecatedEnumValue from "~icons/lucide/diamond-minus"
+// import IconDeprecatedField from "~icons/lucide/diamond-minus"
+// import IconDierctive from "~icons/lucide/arrow-right"
+// import IconEnumValue from "~icons/lucide/arrow-right"
+// import IconField from "~icons/lucide/rectangle-ellipsis"
+// import IconImplements from "~icons/lucide/arrow-right"
+// import IconType from "~icons/lucide/file-type"
+// import IconRootTypes from "~icons/lucide/folder-kanban"
 
 type ExplorerSectionTitle =
   | "Root Types"
@@ -37,25 +37,25 @@ type ExplorerSectionTitle =
   | "Directives"
   | "All Schema Types"
 
-const props = defineProps<{
+defineProps<{
   title: ExplorerSectionTitle
 }>()
 
-const TYPE_TO_ICON: Record<ExplorerSectionTitle, any> = {
-  Arguments: IconArgument,
-  "Deprecated Arguments": IconDeprecatedArgument,
-  "Deprecated Enum Values": IconDeprecatedEnumValue,
-  "Deprecated Fields": IconDeprecatedField,
-  Directives: IconDierctive,
-  "Enum Values": IconEnumValue,
-  Fields: IconField,
-  Implements: IconImplements,
-  Implementations: IconType,
-  "Possible Types": IconType,
-  "Root Types": IconRootTypes,
-  Type: IconType,
-  "All Schema Types": IconType,
-}
+// const TYPE_TO_ICON: Record<ExplorerSectionTitle, any> = {
+//   Arguments: IconArgument,
+//   "Deprecated Arguments": IconDeprecatedArgument,
+//   "Deprecated Enum Values": IconDeprecatedEnumValue,
+//   "Deprecated Fields": IconDeprecatedField,
+//   Directives: IconDierctive,
+//   "Enum Values": IconEnumValue,
+//   Fields: IconField,
+//   Implements: IconImplements,
+//   Implementations: IconType,
+//   "Possible Types": IconType,
+//   "Root Types": IconRootTypes,
+//   Type: IconType,
+//   "All Schema Types": IconType,
+// }
 
-const iconComponent = TYPE_TO_ICON[props.title]
+// const iconComponent = TYPE_TO_ICON[props.title]
 </script>

+ 1 - 1
packages/hoppscotch-common/src/components/http/test/Response.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="relative flex flex-1 flex-col">
     <div
-      class="sticky top-0 z-50 flex-none flex-shrink-0 items-center justify-center whitespace-nowrap bg-primary p-4"
       v-if="doc.response?.type === 'network_fail'"
+      class="sticky top-0 z-50 flex-none flex-shrink-0 items-center justify-center whitespace-nowrap bg-primary p-4"
     >
       <span class="text-secondary">
         {{ t("response.status") }}:

+ 0 - 2
packages/hoppscotch-common/src/helpers/graphql/query.ts

@@ -178,7 +178,6 @@ export function useQuery() {
 
     // For existing operations
     let currentSelectionSet = existingOperation.selectionSet
-    let fieldExists = false
     let fieldLocation: { start: number; end: number } | undefined
     let append = false
 
@@ -230,7 +229,6 @@ export function useQuery() {
           } else {
             // Remove the field if it's not an argument operation
             currentSelectionSet.selections.splice(existingFieldIndex, 1)
-            fieldExists = true
           }
 
           if (existingField.loc) {