chore: resolve lint errors

This commit is contained in:
jamesgeorge007 2025-01-30 16:32:52 +05:30
parent 86ea3e427c
commit e96232133d
3 changed files with 28 additions and 30 deletions

View file

@ -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>

View file

@ -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") }}:

View file

@ -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) {