From c9aefa81ca1950121d2357fc66afe15eb400f537 Mon Sep 17 00:00:00 2001
From: Leonardo Bishop <me@leonardobishop.com>
Date: Fri, 15 Mar 2024 00:13:40 +0000
Subject: Fix eslint errors

---
 components/base/ItemStack/ItemStackPicker.vue | 44 +++++++++++++++------------
 1 file changed, 24 insertions(+), 20 deletions(-)

(limited to 'components/base/ItemStack/ItemStackPicker.vue')

diff --git a/components/base/ItemStack/ItemStackPicker.vue b/components/base/ItemStack/ItemStackPicker.vue
index 2dc35d3..09c0130 100644
--- a/components/base/ItemStack/ItemStackPicker.vue
+++ b/components/base/ItemStack/ItemStackPicker.vue
@@ -13,11 +13,13 @@ const showItemStackModal = ref(false);
 
 //TODO unshitify
 const empty = computed(() => {
-  return value.value === undefined
-    || value.value === null
-    || value.value === ''
-    || (Array.isArray(value.value) && value.value.length === 0)
-    || (typeof value.value === 'object' && Object.keys(value.value).length === 0);
+  return (
+    value.value === undefined ||
+    value.value === null ||
+    value.value === '' ||
+    (Array.isArray(value.value) && value.value.length === 0) ||
+    (typeof value.value === 'object' && Object.keys(value.value).length === 0)
+  );
 });
 const isQuestItem = computed(() => {
   return value.value?.['quest-item'] !== undefined;
@@ -27,16 +29,12 @@ const isItemStack = computed(() => {
     return false;
   }
 
-  const key = 'item' in value.value
-    ? 'item'
-    : 'type' in value.value
-      ? 'type'
-      : 'material'
+  const key = 'item' in value.value ? 'item' : 'type' in value.value ? 'type' : 'material';
 
-  return (!!value.value[key]);
+  return !!value.value[key];
 });
 const isMaterial = computed(() => {
-  return typeof value.value === 'string' && materials.includes(value.value)
+  return typeof value.value === 'string' && materials.includes(value.value);
 });
 
 const update = (newValue: any) => {
@@ -49,13 +47,19 @@ const update = (newValue: any) => {
 <template>
   <div class="itemstack" @click="showItemStackModal = true">
     <span v-if="empty" class="empty">ItemStack...</span>
-    <span v-if="isQuestItem" class="item"><font-awesome-icon :icon="['fas', 'tag']" /> Quest Item: {{
-    value['quest-item'] }}</span>
-    <span v-if="isItemStack" class="item"><font-awesome-icon :icon="['fas', 'cube']" /> ItemStack: {{ value.type ||
-    value.item || value.material }}</span>
-    <span v-if="isMaterial" class="item"><font-awesome-icon :icon="['fas', 'apple-whole']" /> {{ value }}</span>
-    <span v-if="!empty && !isQuestItem && !isItemStack && !isMaterial" class="invalid"><font-awesome-icon
-        :icon="['fas', 'triangle-exclamation']" /> Invalid ItemStack</span>
+    <span v-if="isQuestItem" class="item"
+      ><font-awesome-icon :icon="['fas', 'tag']" /> Quest Item: {{ value['quest-item'] }}</span
+    >
+    <span v-if="isItemStack" class="item"
+      ><font-awesome-icon :icon="['fas', 'cube']" /> ItemStack:
+      {{ value.type || value.item || value.material }}</span
+    >
+    <span v-if="isMaterial" class="item"
+      ><font-awesome-icon :icon="['fas', 'apple-whole']" /> {{ value }}</span
+    >
+    <span v-if="!empty && !isQuestItem && !isItemStack && !isMaterial" class="invalid"
+      ><font-awesome-icon :icon="['fas', 'triangle-exclamation']" /> Invalid ItemStack</span
+    >
   </div>
 
   <ItemStackModal v-model="showItemStackModal" :value="value" @confirm="update" />
@@ -94,4 +98,4 @@ const update = (newValue: any) => {
     background-color: var(--color-hover);
   }
 }
-</style>
\ No newline at end of file
+</style>
-- 
cgit v1.2.3-70-g09d2

