Browse Source

chore(nc-gui): lint

pull/6177/head
Wing-Kam Wong 1 year ago
parent
commit
5d34ce2eed
  1. 4
      packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue
  2. 4
      packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue
  3. 2
      packages/nc-gui/components/smartsheet/column/FormulaOptions.vue
  4. 2
      packages/nc-gui/components/smartsheet/sidebar/toolbar/DebugMeta.vue
  5. 2
      packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue
  6. 2
      packages/nc-gui/plugins/jobs.ts
  7. 2
      packages/nc-gui/plugins/tele.ts
  8. 2
      packages/nc-gui/store/project.ts

4
packages/nc-gui/components/dashboard/settings/data-sources/CreateBase.vue

@ -1,12 +1,10 @@
<script lang="ts" setup> <script lang="ts" setup>
import { Form, Modal, message } from 'ant-design-vue' import { Form, Modal, message } from 'ant-design-vue'
import type { SelectHandler } from 'ant-design-vue/es/vc-select/Select' import type { SelectHandler } from 'ant-design-vue/es/vc-select/Select'
import type { ProjectCreateForm } from '#imports' import type { DefaultConnection, ProjectCreateForm, SQLiteConnection } from '#imports'
import { import {
CertTypes, CertTypes,
ClientType, ClientType,
DefaultConnection,
SQLiteConnection,
SSLUsage, SSLUsage,
clientTypes as _clientTypes, clientTypes as _clientTypes,
computed, computed,

4
packages/nc-gui/components/dashboard/settings/data-sources/EditBase.vue

@ -2,12 +2,10 @@
import type { BaseType } from 'nocodb-sdk' import type { BaseType } from 'nocodb-sdk'
import { Form, Modal, message } from 'ant-design-vue' import { Form, Modal, message } from 'ant-design-vue'
import type { SelectHandler } from 'ant-design-vue/es/vc-select/Select' import type { SelectHandler } from 'ant-design-vue/es/vc-select/Select'
import type { ProjectCreateForm } from '#imports' import type { DefaultConnection, ProjectCreateForm, SQLiteConnection } from '#imports'
import { import {
CertTypes, CertTypes,
ClientType, ClientType,
DefaultConnection,
SQLiteConnection,
SSLUsage, SSLUsage,
clientTypes, clientTypes,
computed, computed,

2
packages/nc-gui/components/smartsheet/column/FormulaOptions.vue

@ -78,7 +78,7 @@ const formulaRef = ref()
const sugListRef = ref() const sugListRef = ref()
const sugOptionsRef = ref<typeof AntListItem[]>([]) const sugOptionsRef = ref<(typeof AntListItem)[]>([])
const wordToComplete = ref<string | undefined>('') const wordToComplete = ref<string | undefined>('')

2
packages/nc-gui/components/smartsheet/sidebar/toolbar/DebugMeta.vue

@ -10,7 +10,7 @@ const { metas } = $(useMetas())
const { tables } = useTable() const { tables } = useTable()
const localTables = computed( const localTables = computed(
() => tables.value.filter((t) => metas[t.id as string]) as (typeof tables.value[number] & { id: string })[], () => tables.value.filter((t) => metas[t.id as string]) as ((typeof tables.value)[number] & { id: string })[],
) )
</script> </script>

2
packages/nc-gui/components/smartsheet/toolbar/ViewActions.vue

@ -49,7 +49,7 @@ type QuickImportDialogType = 'csv' | 'excel' | 'json'
// TODO: add 'json' when it's ready // TODO: add 'json' when it's ready
const quickImportDialogTypes: QuickImportDialogType[] = ['csv', 'excel'] const quickImportDialogTypes: QuickImportDialogType[] = ['csv', 'excel']
const quickImportDialogs: Record<typeof quickImportDialogTypes[number], Ref<boolean>> = quickImportDialogTypes.reduce( const quickImportDialogs: Record<(typeof quickImportDialogTypes)[number], Ref<boolean>> = quickImportDialogTypes.reduce(
(acc: any, curr) => { (acc: any, curr) => {
acc[curr] = ref(false) acc[curr] = ref(false)
return acc return acc

2
packages/nc-gui/plugins/jobs.ts

@ -14,7 +14,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
const url = new URL(appInfo.ncSiteUrl, window.location.href.split(/[?#]/)[0]) const url = new URL(appInfo.ncSiteUrl, window.location.href.split(/[?#]/)[0])
let socketPath = url.pathname let socketPath = url.pathname
socketPath += socketPath.endsWith("/") ? "socket.io" : "/socket.io" socketPath += socketPath.endsWith('/') ? 'socket.io' : '/socket.io'
socket = io(`${url.href}jobs`, { socket = io(`${url.href}jobs`, {
extraHeaders: { 'xc-auth': token }, extraHeaders: { 'xc-auth': token },

2
packages/nc-gui/plugins/tele.ts

@ -18,7 +18,7 @@ export default defineNuxtPlugin(async (nuxtApp) => {
const url = new URL(appInfo.ncSiteUrl, window.location.href.split(/[?#]/)[0]) const url = new URL(appInfo.ncSiteUrl, window.location.href.split(/[?#]/)[0])
let socketPath = url.pathname let socketPath = url.pathname
socketPath += socketPath.endsWith("/") ? "socket.io" : "/socket.io" socketPath += socketPath.endsWith('/') ? 'socket.io' : '/socket.io'
socket = io(url.href, { socket = io(url.href, {
extraHeaders: { 'xc-auth': token }, extraHeaders: { 'xc-auth': token },

2
packages/nc-gui/store/project.ts

@ -66,7 +66,7 @@ export const useProject = defineStore('projectStore', () => {
for (const base of bases.value) { for (const base of bases.value) {
if (base.id) { if (base.id) {
temp[base.id] = SqlUiFactory.create({ client: base.type }) as Exclude< temp[base.id] = SqlUiFactory.create({ client: base.type }) as Exclude<
ReturnType<typeof SqlUiFactory['create']>, ReturnType<(typeof SqlUiFactory)['create']>,
typeof OracleUi typeof OracleUi
> >
} }

Loading…
Cancel
Save