chore: lint

This commit is contained in:
axolotle 2024-08-22 00:56:46 +02:00
parent ee6f93505f
commit 4004e680a4
10 changed files with 34 additions and 31 deletions

View file

@ -11,7 +11,7 @@ const { locked } = useRequests()
const { spinner, dark } = useSettings()
const ready = ref(false)
onAppCreated().then(() => ready.value = true)
onAppCreated().then(() => (ready.value = true))
onMounted(() => {
const copypastaCode = ['ArrowDown', 'ArrowDown', 'ArrowUp', 'ArrowUp']
@ -87,7 +87,12 @@ onMounted(() => {
<BNavbarNav class="ms-auto">
<li class="nav-item">
<BButton :href="ssoLink" variant="primary" size="sm" class="d-block">
<BButton
:href="ssoLink"
variant="primary"
size="sm"
class="d-block"
>
{{ $t('user_interface_link') }} <YIcon iname="user" />
</BButton>
</li>

View file

@ -39,7 +39,10 @@ const visible = ref(!props.collapsed)
</script>
<template>
<BCard :no-body="collapsible ? true : noBody" :class="{ 'border-0': asTab, 'collapsible': collapsible }">
<BCard
:no-body="collapsible ? true : noBody"
:class="{ 'border-0': asTab, collapsible: collapsible }"
>
<template v-if="!asTab" #header>
<div class="w-100 d-flex align-items-center flex-wrap custom-header">
<slot name="header">

View file

@ -1,5 +1,5 @@
<script setup lang="ts">
const props = withDefaults(
withDefaults(
defineProps<{
label: string
sublabel?: string
@ -7,6 +7,7 @@ const props = withDefaults(
}>(),
{
sublabel: undefined,
description: undefined,
},
)

View file

@ -4,7 +4,7 @@ withDefaults(defineProps<{ button: boolean; search: boolean }>(), {
search: false,
})
const slots = defineSlots<{
defineSlots<{
default: any
}>()
</script>

View file

@ -127,10 +127,7 @@ export function useUsersAndGroups(username?: MaybeRefOrGetter<string>) {
}
}
export function useDomains(
domain_?: MaybeRefOrGetter<string>,
installed: boolean = true,
) {
export function useDomains(domain_?: MaybeRefOrGetter<string>) {
const { mainDomain, domains: domains_, domainDetails } = useData()
const domains = computed(() => {

View file

@ -21,7 +21,7 @@ type BreadcrumbRoutes = {
args: RouteMeta['args']
}
function formatRoute({ name, params, args }: BreadcrumbRoutes) {
function formatRoute({ params, args }: BreadcrumbRoutes) {
const { trad, param } = args
// if a traduction key string has been given and we also need to pass
// the route param as a variable.
@ -47,7 +47,6 @@ export const useInfos = createGlobalState(() => {
const breadcrumb = computed(() => {
return breadcrumbRoutes.value.map((to) => {
console.log(to)
return { to: { name: to.name }, text: formatRoute(to) }
})
})

View file

@ -53,7 +53,7 @@ type BaseWritableItemProps = {
disabled?: boolean
}
export type BaseItemComputedProps<MV extends any = any> = {
export type BaseItemComputedProps = {
ariaDescribedby?: string | string[]
state?: StateValidation
validation?: BaseValidation
@ -296,10 +296,10 @@ export type FormFieldProps<
BaseFormFieldComputedProps
// BaseFormFieldComputedProps<MV>
export type FormFieldReadonlyProps<
C extends AnyWritableComponents,
MV extends any,
> = Omit<FormFieldReadonly<C>, 'hr' | 'visible' | 'readonly' | 'rules'>
export type FormFieldReadonlyProps<C extends AnyWritableComponents> = Omit<
FormFieldReadonly<C>,
'hr' | 'visible' | 'readonly' | 'rules'
>
export type FormFieldDict<T extends Obj = Obj> = {
[k in keyof T | string]: k extends keyof T

View file

@ -191,7 +191,7 @@ function downloadBackup() {
>
<div class="me-2">
<h5>
<span class="fw-bold">{{ item.name }}</span>
<span class="fw-bold">{{ item.name }}</span>
<small class="ms-1 text-secondary">
{{ appName }} ({{ humanSize(item.size) }})
</small>

View file

@ -40,7 +40,7 @@ const { user } = useUsersAndGroups(() => props.name)
// mailbox-quota could be 'No quota' or 'Pas de quota'...
const mailboxQuota =
parseInt(user.value['mailbox-quota'].limit) > 0
? sizeToM(user.value['mailbox-quota'].limit) ?? 0
? (sizeToM(user.value['mailbox-quota'].limit) ?? 0)
: 0
type Form = typeof form.value

View file

@ -1,14 +1,12 @@
{
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"strict": true,
"types": [
"node"
]
},
"include": ["vite.config.ts"]
}
"compilerOptions": {
"composite": true,
"skipLibCheck": true,
"module": "ESNext",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"strict": true,
"types": ["node"]
},
"include": ["vite.config.ts"]
}