From 1acd9877bafa73fc7aa47c94c11e47969cae07de Mon Sep 17 00:00:00 2001 From: Nexmoe <16796652+nexmoe@users.noreply.github.com> Date: Tue, 30 Apr 2024 11:46:30 +0800 Subject: [PATCH] fix: lint --- app.vue | 5 +++- components/LinkIcon.vue | 4 ++- components/flow/Header.vue | 5 +++- components/flow/Index.vue | 35 ++++++++++++++++++++----- components/module/Gallery.vue | 14 +++++++--- components/module/Image.vue | 29 +++++++++++++++----- components/module/List.vue | 5 +++- components/public/Header.vue | 4 +-- components/{ => public}/Social.vue | 7 ++++- eslint.config.mjs | 28 ++++++++++---------- layouts/default.vue | 8 +++--- nuxt.config.ts | 10 +++---- pages/flow/[id].vue | 15 ++++++++--- pages/index.vue | 18 ++++++++++--- pages/module/[id].vue | 19 +++++++++++--- pages/space/_[id].vue | 10 +++++-- server/middleware/update-site-config.ts | 2 +- 17 files changed, 158 insertions(+), 60 deletions(-) rename components/{ => public}/Social.vue (80%) diff --git a/app.vue b/app.vue index c2371bd..18ddf89 100644 --- a/app.vue +++ b/app.vue @@ -12,7 +12,10 @@ watch( - + diff --git a/components/LinkIcon.vue b/components/LinkIcon.vue index 73514ad..15a6d4d 100644 --- a/components/LinkIcon.vue +++ b/components/LinkIcon.vue @@ -14,6 +14,8 @@ function getOrigin(url: string) { diff --git a/components/flow/Header.vue b/components/flow/Header.vue index a1a367e..3a9aa31 100644 --- a/components/flow/Header.vue +++ b/components/flow/Header.vue @@ -8,7 +8,10 @@ const props = defineProps() - + {{ props.title }} diff --git a/components/flow/Index.vue b/components/flow/Index.vue index 84a51f6..b940fb9 100644 --- a/components/flow/Index.vue +++ b/components/flow/Index.vue @@ -19,21 +19,42 @@ provide('flow', props.flow) - + - - - - + + + + diff --git a/components/module/Gallery.vue b/components/module/Gallery.vue index c6b67c0..d044dfb 100644 --- a/components/module/Gallery.vue +++ b/components/module/Gallery.vue @@ -23,10 +23,18 @@ const props = defineProps() {{ formatDateTime(module.date) }} - + diff --git a/components/module/Image.vue b/components/module/Image.vue index e8612ef..2063c3d 100644 --- a/components/module/Image.vue +++ b/components/module/Image.vue @@ -27,25 +27,42 @@ const text = computed(() => extractTextFromHTML(props.module.content)) {{ formatDateTime(module.date) }} - + - + {{ props.module.title }} - + diff --git a/components/module/List.vue b/components/module/List.vue index 15d2ca5..8256b98 100644 --- a/components/module/List.vue +++ b/components/module/List.vue @@ -38,7 +38,10 @@ const text = extractTextFromHTML(props.module.content) - + diff --git a/components/public/Header.vue b/components/public/Header.vue index 1b0be3b..215518d 100644 --- a/components/public/Header.vue +++ b/components/public/Header.vue @@ -29,7 +29,7 @@ const config = await useGetConfig() - + @@ -51,7 +51,7 @@ const config = await useGetConfig() - + diff --git a/components/Social.vue b/components/public/Social.vue similarity index 80% rename from components/Social.vue rename to components/public/Social.vue index 26160ff..699ceff 100644 --- a/components/Social.vue +++ b/components/public/Social.vue @@ -19,7 +19,12 @@ export interface Props { - + diff --git a/eslint.config.mjs b/eslint.config.mjs index 2b73429..b467511 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,19 +1,19 @@ import withNuxt from './.nuxt/eslint.config.mjs' export default withNuxt( - // your custom flat configs go here, for example: - // { - // files: ['**/*.ts', '**/*.tsx'], - // rules: { - // 'no-console': 'off' // allow console.log in TypeScript files - // } - // }, - // { - // ... - // } - { - - ignores: ['dist', '**/dist/**', 'public', '**/public/**', 'auto-imports.d.ts', '**/auto-imports.d.ts/**', 'components.d.ts', '**/components.d.ts/**', '.output', '**/.output/**', 'node_modules', '**/node_modules/**', 'components/ui', '**/components/ui/**'], + // your custom flat configs go here, for example: + // { + // files: ['**/*.ts', '**/*.tsx'], + // rules: { + // 'no-console': 'off' // allow console.log in TypeScript files + // } + // }, + // { + // ... + // } + { - } + ignores: ['dist', '**/dist/**', 'public', '**/public/**', 'auto-imports.d.ts', '**/auto-imports.d.ts/**', 'components.d.ts', '**/components.d.ts/**', '.output', '**/.output/**', 'node_modules', '**/node_modules/**', 'components/ui', '**/components/ui/**'], + + }, ) diff --git a/layouts/default.vue b/layouts/default.vue index 2b9f574..6b268c6 100644 --- a/layouts/default.vue +++ b/layouts/default.vue @@ -8,10 +8,10 @@ useHead({ - - - - + + + + diff --git a/nuxt.config.ts b/nuxt.config.ts index eabf2d7..a056032 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -54,15 +54,15 @@ export default defineNuxtConfig({ '@nuxtjs/html-validator', '@nuxtjs/web-vitals', 'nuxt-gtag', - "@nuxt/eslint" + '@nuxt/eslint', ], eslint: { config: { stylistic: { indent: 'tab', - } - } + }, + }, }, shadcn: { @@ -112,7 +112,7 @@ export default defineNuxtConfig({ 'cdn.dribbble.com', 'picx.zhimg.com', 'img.zcool.cn', - 'image.coolapk.com' + 'image.coolapk.com', ], }, @@ -142,4 +142,4 @@ export default defineNuxtConfig({ enabled: true, }, }, -}) \ No newline at end of file +}) diff --git a/pages/flow/[id].vue b/pages/flow/[id].vue index 28028ba..2793aa2 100644 --- a/pages/flow/[id].vue +++ b/pages/flow/[id].vue @@ -27,10 +27,19 @@ defineOgImageComponent('NuxtSeo', { {{ flow.title }} - + {{ flow.description }} - - + + diff --git a/pages/index.vue b/pages/index.vue index f38f6ea..47a05c6 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -28,18 +28,28 @@ defineOgImageComponent('NuxtSeo', { - + {{ item }} - - + + diff --git a/pages/module/[id].vue b/pages/module/[id].vue index 3fed833..fe1170c 100644 --- a/pages/module/[id].vue +++ b/pages/module/[id].vue @@ -26,10 +26,12 @@ function replaceImg(html: string) { {{ formatDateTime(module.date) }} - + - + diff --git a/pages/space/_[id].vue b/pages/space/_[id].vue index f33701e..33020ae 100644 --- a/pages/space/_[id].vue +++ b/pages/space/_[id].vue @@ -19,8 +19,14 @@ provide('flows', flows) - - + + diff --git a/server/middleware/update-site-config.ts b/server/middleware/update-site-config.ts index 7ef197b..2342c49 100644 --- a/server/middleware/update-site-config.ts +++ b/server/middleware/update-site-config.ts @@ -5,7 +5,7 @@ export default eventHandler(async (e) => { const caller = appRouter.createCaller({ prisma: e.context.prisma }) const config = await caller.config.get() - + console.log(config.siteName) // updateSiteConfig({ // name: config.siteName,