lint code

Signed-off-by: Arthur DANJOU <arthurdanjou@outlook.fr>
This commit is contained in:
2024-04-20 01:12:41 +02:00
parent c698bfec8a
commit 4574a7dccd
69 changed files with 3110 additions and 3013 deletions

View File

@@ -1,6 +1,6 @@
import type {RouterConfig} from '@nuxt/schema'
function findHashPosition(hash: any): { el: any, behavior: ScrollBehavior, top: number } | undefined {
function findHashPosition(hash: string): { el: string, behavior: ScrollBehavior, top: number } | undefined {
const el = document.querySelector(hash)
// vue-router does not incorporate scroll-margin-top on its own.
if (el) {

View File

@@ -8,12 +8,24 @@ function getColor() {
</script>
<template>
<div v-if="announce" class="w-container flex justify-center mt-8">
<div
v-if="announce"
class="w-container flex justify-center mt-8"
>
<div class="relative">
<h1 class="px-4 py-2 bg-white dark:bg-zinc-900 rounded-md border border-zinc-100 dark:border-zinc-300/10" v-html="announce.content" />
<h1
class="px-4 py-2 bg-white dark:bg-zinc-900 rounded-md border border-zinc-100 dark:border-zinc-300/10"
v-html="announce.content"
/>
<span class="absolute -top-0.5 -right-0.5 flex h-2 w-2">
<span class="animate-ping absolute inline-flex h-full w-full rounded-full opacity-75" :class="getColor()" />
<span class="relative inline-flex rounded-full h-2 w-2" :class="getColor()" />
<span
class="animate-ping absolute inline-flex h-full w-full rounded-full opacity-75"
:class="getColor()"
/>
<span
class="relative inline-flex rounded-full h-2 w-2"
:class="getColor()"
/>
</span>
</div>
</div>

View File

@@ -21,7 +21,10 @@ const getColor = computed(() => appConfig.ui.primary)
<Header />
<UContainer>
<div class="flex flex-col items-center gap-4 mt-12">
<h1 class="font-medium text-[8rem] md:text-[16rem] leading-none bg-error bg-clip-text tracking-wider font-error" :class="`text-${getColor}-500`">
<h1
class="font-medium text-[8rem] md:text-[16rem] leading-none bg-error bg-clip-text tracking-wider font-error"
:class="`text-${getColor}-500`"
>
{{ error?.statusCode }}
</h1>
<p class="text-lg md:text-2xl text-subtitle text-center">
@@ -34,7 +37,12 @@ const getColor = computed(() => appConfig.ui.primary)
</p>
</div>
<div class="flex justify-center mt-8 mb-12">
<UButton to="/" size="md" variant="soft" color="primary">
<UButton
to="/"
size="md"
variant="soft"
color="primary"
>
Go back to the main page
</UButton>
</div>

View File

@@ -1,7 +1,7 @@
import antfu from '@antfu/eslint-config'
import withNuxt from './.nuxt/eslint.config.mjs'
export default antfu({
export default withNuxt({
rules: {
'node/prefer-global/process': 'off',
'vue/multi-word-component-names': 'off',
},
})

View File

@@ -16,6 +16,7 @@ export default defineNuxtConfig({
'@pinia-plugin-persistedstate/nuxt',
'@vueuse/nuxt',
'@nuxt/ui',
'@nuxt/eslint',
],
colorMode: {
@@ -38,6 +39,16 @@ export default defineNuxtConfig({
},
},
eslint: {
config: {
stylistic: {
indent: 'tab',
semi: false,
blockSpacing: true,
},
},
},
ui: {
icons: 'all',
},

View File

@@ -19,7 +19,7 @@
"@pinia/nuxt": "0.5.1",
"@vercel/analytics": "1.2.2",
"@vercel/speed-insights": "1.0.10",
"drizzle-kit": "0.20.14",
"drizzle-kit": "0.20.16",
"drizzle-orm": "0.30.8",
"nuxt": "3.10.3",
"nuxt-auth-utils": "0.0.20",
@@ -32,8 +32,8 @@
"zod": "3.22.5"
},
"devDependencies": {
"@antfu/eslint-config": "2.15.0",
"@iconify/json": "2.2.202",
"@nuxt/eslint": "0.3.8",
"@nuxthq/studio": "1.0.13",
"@nuxtjs/seo": "2.0.0-rc.10",
"@pinia-plugin-persistedstate/nuxt": "1.2.0",
@@ -41,6 +41,7 @@
"@vueuse/core": "10.9.0",
"@vueuse/nuxt": "10.9.0",
"eslint": "9.1.0",
"typescript": "5.4.5"
"typescript": "5.4.5",
"vite-plugin-eslint2": "^4.4.0"
}
}

779
yarn.lock

File diff suppressed because it is too large Load Diff