mirror of
https://github.com/ArthurDanjou/artsite.git
synced 2026-01-25 07:52:38 +01:00
Change linter config to antfu config and lint code
This commit is contained in:
@@ -9,7 +9,8 @@ const { locale, locales } = useI18n()
|
||||
const currentLocale = computed(() => locales.value.find(l => l.code === locale.value))
|
||||
|
||||
const getActivity = computed(() => {
|
||||
if (!codingActivity.value) return
|
||||
if (!codingActivity.value)
|
||||
return
|
||||
|
||||
const { name, details, state, timestamps } = codingActivity.value
|
||||
const isActive = name === 'Visual Studio Code'
|
||||
@@ -44,14 +45,14 @@ const getActivity = computed(() => {
|
||||
.trim(),
|
||||
formated: {
|
||||
date: formatDate(timestamps.start, 'DD MMM YYYY'),
|
||||
time: formatDate(timestamps.start, 'HH:mm:ss')
|
||||
}
|
||||
}
|
||||
time: formatDate(timestamps.start, 'HH:mm:ss'),
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
const { t } = useI18n({
|
||||
useScope: 'local'
|
||||
useScope: 'local',
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
const { width } = useWindowSize()
|
||||
const { t } = useI18n({
|
||||
useScope: 'local',
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ClientOnly>
|
||||
<div
|
||||
@@ -13,13 +20,6 @@
|
||||
</ClientOnly>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const { width } = useWindowSize()
|
||||
const { t } = useI18n({
|
||||
useScope: 'local'
|
||||
})
|
||||
</script>
|
||||
|
||||
<i18n lang="json">
|
||||
{
|
||||
"en": {
|
||||
|
||||
@@ -4,15 +4,15 @@ import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
text: {
|
||||
type: [String, Number],
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
hover: {
|
||||
type: String,
|
||||
required: true
|
||||
required: true,
|
||||
},
|
||||
position: {
|
||||
type: String as PropType<'top' | 'right' | 'bottom' | 'left'>
|
||||
}
|
||||
type: String as PropType<'top' | 'right' | 'bottom' | 'left'>,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@ import type { PropType } from 'vue'
|
||||
defineProps({
|
||||
href: {
|
||||
type: String,
|
||||
default: ''
|
||||
default: '',
|
||||
},
|
||||
target: {
|
||||
type: String as PropType<'_blank' | '_parent' | '_self' | '_top' | (string & object) | null | undefined>,
|
||||
default: undefined,
|
||||
required: false
|
||||
}
|
||||
required: false,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, useRuntimeConfig } from '#imports'
|
||||
|
||||
const props = defineProps<{ id?: string }>()
|
||||
|
||||
const { headings } = useRuntimeConfig().public.mdc
|
||||
const generate = computed(() => props.id && ((typeof headings?.anchorLinks === 'boolean' && headings?.anchorLinks) || (typeof headings?.anchorLinks === 'object' && headings?.anchorLinks?.h2)))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h2
|
||||
:id="id"
|
||||
@@ -12,12 +21,3 @@
|
||||
<slot v-else />
|
||||
</h2>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, useRuntimeConfig } from '#imports'
|
||||
|
||||
const props = defineProps<{ id?: string }>()
|
||||
|
||||
const { headings } = useRuntimeConfig().public.mdc
|
||||
const generate = computed(() => props.id && ((typeof headings?.anchorLinks === 'boolean' && headings?.anchorLinks) || (typeof headings?.anchorLinks === 'object' && headings?.anchorLinks?.h2)))
|
||||
</script>
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
<script lang="ts" setup>
|
||||
import { computed, useRuntimeConfig } from '#imports'
|
||||
|
||||
const props = defineProps<{ id?: string }>()
|
||||
|
||||
const { headings } = useRuntimeConfig().public.mdc
|
||||
const generate = computed(() => props.id && ((typeof headings?.anchorLinks === 'boolean' && headings?.anchorLinks) || (typeof headings?.anchorLinks === 'object' && headings?.anchorLinks?.h2)))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<h2
|
||||
:id="id"
|
||||
@@ -12,12 +21,3 @@
|
||||
<slot v-else />
|
||||
</h2>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, useRuntimeConfig } from '#imports'
|
||||
|
||||
const props = defineProps<{ id?: string }>()
|
||||
|
||||
const { headings } = useRuntimeConfig().public.mdc
|
||||
const generate = computed(() => props.id && ((typeof headings?.anchorLinks === 'boolean' && headings?.anchorLinks) || (typeof headings?.anchorLinks === 'object' && headings?.anchorLinks?.h2)))
|
||||
</script>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
defineProps({
|
||||
icon: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
const { t } = useI18n({
|
||||
useScope: 'local',
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex items-center gap-2 mt-4">
|
||||
<div class="flex items-center">
|
||||
@@ -17,12 +23,6 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
const { t } = useI18n({
|
||||
useScope: 'local'
|
||||
})
|
||||
</script>
|
||||
|
||||
<i18n lang="json">
|
||||
{
|
||||
"en": {
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { Stats } from '~~/types'
|
||||
|
||||
const { data: stats } = await useFetch<Stats>('/api/stats')
|
||||
const { t } = useI18n({
|
||||
useScope: 'local'
|
||||
useScope: 'local',
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user