Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

chore(nc-gui): lint

Ramesh Manea24c994c5ddd
diff --git a/packages/nc-gui/components/dashboard/settings/base/MCP/Code.vue b/packages/nc-gui/components/dashboard/settings/base/MCP/Code.vue
index ec462efc1d..d22a612b41 100644
--- a/packages/nc-gui/components/dashboard/settings/base/MCP/Code.vue
+++ b/packages/nc-gui/components/dashboard/settings/base/MCP/Code.vue
@@ -1,5 +1,4 @@
<script setup lang="ts">
-import { LoadingOutlined } from '@ant-design/icons-vue'
import { defineAsyncComponent } from 'vue'
const props = defineProps<Props>()
@@ -13,13 +12,6 @@ interface Props {
const code = toRef(props, 'code')
-const indicator = h(LoadingOutlined, {
- style: {
- fontSize: '2rem',
- },
- spin: true,
-})
-
const { t } = useI18n()
const { copy } = useCopy()
diff --git a/packages/nc-gui/components/monaco/Editor.vue b/packages/nc-gui/components/monaco/Editor.vue
index cbb168a02c..109ff66716 100644
--- a/packages/nc-gui/components/monaco/Editor.vue
+++ b/packages/nc-gui/components/monaco/Editor.vue
@@ -27,12 +27,6 @@ const props = withDefaults(defineProps<Props>(), {
const emits = defineEmits(['update:modelValue'])
-// Make this component async by awaiting Monaco initialization
-await initializeMonaco()
-
-// Add a small delay to ensure Suspense triggers even if Monaco is already initialized
-await new Promise((resolve) => setTimeout(resolve, 100))
-
const { modelValue, readOnly } = toRefs(props)
const { hideMinimap, lang, validate, disableDeepCompare, autoFocus, monacoConfig, monacoCustomTheme, placeholder } = props
@@ -118,7 +112,7 @@ const retryLoad = async () => {
// Re-run the initialization logic
if (root.value && lang) {
- const model = monacoEditor.createModel(vModel.value || '', lang)
+ monacoEditor.createModel(vModel.value || '', lang)
// ... rest of initialization
isLoading.value = false
}
@@ -144,6 +138,14 @@ defineExpose({
error,
})
+// β›” all top-level awaits come *after* macros
+
+// Make this component async by awaiting Monaco initialization
+await initializeMonaco()
+
+// Add a small delay to ensure Suspense triggers even if Monaco is already initialized
+await new Promise((resolve) => setTimeout(resolve, 100))
+
onMounted(async () => {
try {
await initializeMonaco()
diff --git a/packages/nc-gui/components/smartsheet/details/Api.vue b/packages/nc-gui/components/smartsheet/details/Api.vue
index c1ffb6ea1a..ff02c02e92 100644
--- a/packages/nc-gui/components/smartsheet/details/Api.vue
+++ b/packages/nc-gui/components/smartsheet/details/Api.vue
@@ -1,6 +1,5 @@
<script setup lang="ts">
import { HTTPSnippet } from '@readme/httpsnippet'
-import { LoadingOutlined } from '@ant-design/icons-vue'
import { defineAsyncComponent } from 'vue'
// Define Monaco Editor as an async component
@@ -21,13 +20,6 @@ const { xWhere } = useSmartsheetStoreOrThrow()
const { queryParams } = useViewData(meta, view, xWhere)
-const indicator = h(LoadingOutlined, {
- style: {
- fontSize: '2rem',
- },
- spin: true,
-})
-
const { copy } = useCopy()
const isCopied = ref(false)