Skip to content

Commit

Permalink
fix: eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
enkot committed Oct 31, 2024
1 parent 3b0071d commit 59c44fe
Show file tree
Hide file tree
Showing 15 changed files with 116 additions and 113 deletions.
2 changes: 0 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ Add this module to your `nuxt.config.ts`:

```ts
export default defineNuxtConfig({
...
modules: [
...
'@nuxthq/studio'
]
})
Expand Down
32 changes: 16 additions & 16 deletions docs/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ export default defineAppConfig({
footer: {
bottom: {
left: 'text-sm text-gray-500 dark:text-gray-400',
wrapper: 'border-t border-gray-200 dark:border-gray-800'
}
}
wrapper: 'border-t border-gray-200 dark:border-gray-800',
},
},
},
seo: {
siteName: 'Nuxt Open Fetch'
siteName: 'Nuxt Open Fetch',
},
header: {
logo: {
alt: '',
light: '',
dark: ''
dark: '',
},
search: true,
colorMode: true,
links: [{
'icon': 'i-simple-icons-github',
'to': 'https://github.com/enkot/nuxt-open-fetch',
'target': '_blank',
'aria-label': 'Nuxt Open Fetch'
}]
'aria-label': 'Nuxt Open Fetch',
}],
},
footer: {
credits: 'Copyright © 2024',
Expand All @@ -34,13 +34,13 @@ export default defineAppConfig({
'icon': 'i-simple-icons-nuxtdotjs',
'to': 'https://nuxt.com',
'target': '_blank',
'aria-label': 'Nuxt Website'
'aria-label': 'Nuxt Website',
}, {
'icon': 'i-simple-icons-github',
'to': 'https://github.com/enkot/nuxt-open-fetch',
'target': '_blank',
'aria-label': 'Nuxt Open Fetch'
}]
'aria-label': 'Nuxt Open Fetch',
}],
},
toc: {
title: 'Table of Contents',
Expand All @@ -50,18 +50,18 @@ export default defineAppConfig({
icon: 'i-heroicons-star',
label: 'Star on GitHub',
to: 'https://github.com/enkot/nuxt-open-fetch',
target: '_blank'
target: '_blank',
}, {
icon: 'i-simple-icons-typescript',
label: 'OpenAPI TypeScript',
to: 'https://openapi-ts.pages.dev/',
target: '_blank'
target: '_blank',
}, {
icon: 'i-simple-icons-nuxtdotjs',
label: 'Nuxt Website',
to: 'https://nuxt.com',
target: '_blank'
}]
}
}
target: '_blank',
}],
},
},
})
12 changes: 6 additions & 6 deletions docs/app/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@ const { seo } = useAppConfig()
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation())
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
server: false
server: false,
})
useHead({
meta: [
{ name: 'viewport', content: 'width=device-width, initial-scale=1' }
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
],
link: [
{ rel: 'icon', href: '/favicon.ico' }
{ rel: 'icon', href: '/favicon.ico' },
],
htmlAttrs: {
lang: 'en'
}
lang: 'en',
},
})
useSeoMeta({
titleTemplate: `%s - ${seo?.siteName}`,
ogSiteName: seo?.siteName,
ogImage: 'https://nuxt-open-fetch.vercel.app/cover.png',
twitterImage: 'https://nuxt-open-fetch.vercel.app/cover.png',
twitterCard: 'summary_large_image'
twitterCard: 'summary_large_image',
})
provide('navigation', navigation)
Expand Down
8 changes: 4 additions & 4 deletions docs/app/components/OgImage/OgImageDocs.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<script setup lang="ts">
defineOptions({
inheritAttrs: false
inheritAttrs: false,
})
defineProps({
title: {
type: String,
required: true
required: true,
},
description: {
type: String,
required: true
}
required: true,
},
})
</script>

Expand Down
12 changes: 6 additions & 6 deletions docs/app/error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,25 @@ import type { NuxtError } from '#app'
defineProps({
error: {
type: Object as PropType<NuxtError>,
required: true
}
required: true,
},
})
useHead({
htmlAttrs: {
lang: 'en'
}
lang: 'en',
},
})
useSeoMeta({
title: 'Page not found',
description: 'We are sorry but this page could not be found.'
description: 'We are sorry but this page could not be found.',
})
const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation())
const { data: files } = useLazyFetch<ParsedContent[]>('/api/search.json', {
default: () => [],
server: false
server: false,
})
provide('navigation', navigation)
Expand Down
9 changes: 4 additions & 5 deletions docs/app/pages/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { withoutTrailingSlash } from 'ufo'
definePageMeta({
layout: 'docs'
layout: 'docs',
})
const route = useRoute()
Expand All @@ -16,14 +16,13 @@ if (!page.value) {
const { data: surround } = await useAsyncData(`${route.path}-surround`, () => queryContent()
.where({ _extension: 'md', navigation: { $ne: false } })
.only(['title', 'description', '_path'])
.findSurround(withoutTrailingSlash(route.path))
)
.findSurround(withoutTrailingSlash(route.path)))
useSeoMeta({
title: page.value.title,
ogTitle: `${page.value.title} - ${seo?.siteName}`,
description: page.value.description,
ogDescription: page.value.description
ogDescription: page.value.description,
})
defineOgImageComponent('Docs')
Expand All @@ -34,7 +33,7 @@ const links = computed(() => [toc?.bottom?.edit && {
icon: 'i-heroicons-pencil-square',
label: 'Edit this page',
to: `${toc.bottom.edit}/${page?.value?._file}`,
target: '_blank'
target: '_blank',
}, ...(toc?.bottom?.links || [])].filter(Boolean))
</script>

Expand Down
2 changes: 1 addition & 1 deletion docs/app/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ useSeoMeta({
title: page.value.title,
ogTitle: page.value.title,
description: page.value.description,
ogDescription: page.value.description
ogDescription: page.value.description,
})
</script>

Expand Down
40 changes: 20 additions & 20 deletions docs/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,42 @@ export default defineNuxtConfig({
'@nuxt/ui',
'@nuxthq/studio',
'nuxt-og-image',
'nuxt-open-fetch'
'nuxt-open-fetch',
],

devtools: {
enabled: true
enabled: true,
},

site: {
url: 'https://nuxt-open-fetch.vercel.app'
url: 'https://nuxt-open-fetch.vercel.app',
},

colorMode: {
disableTransition: true
disableTransition: true,
},

routeRules: {
'/api/search.json': { prerender: true }
'/api/search.json': { prerender: true },
},

future: {
compatibilityVersion: 4
compatibilityVersion: 4,
},

compatibilityDate: '2024-07-11',

nitro: {
prerender: {
routes: [
'/'
'/',
],
crawlLinks: true
}
crawlLinks: true,
},
},

typescript: {
strict: false
strict: false,
},

hooks: {
Expand All @@ -55,32 +55,32 @@ export default defineNuxtConfig({
const globals = components.filter(c => ['UButton', 'UIcon'].includes(c.pascalName))

globals.forEach(c => c.global = true)
}
},
},

eslint: {
config: {
stylistic: {
commaDangle: 'never',
braceStyle: '1tbs'
}
}
braceStyle: '1tbs',
},
},
},

openFetch: {
disableNitroPlugin: true,
clients: {
pets: {
baseURL: '/petsProxy'
}
}
baseURL: '/petsProxy',
},
},
},

twoslash: {
floatingVueOptions: {
classMarkdown: 'prose prose-primary dark:prose-invert'
classMarkdown: 'prose prose-primary dark:prose-invert',
},
throws: false
throws: false,
// includeNuxtTypes: true
}
},
})
Loading

0 comments on commit 59c44fe

Please sign in to comment.