diff --git a/app.config.ts b/app.config.ts index 99b777c..75be4a8 100644 --- a/app.config.ts +++ b/app.config.ts @@ -1,9 +1,9 @@ import type { RouteLocationRaw } from 'vue-router' +import { NuxtApp } from '#app' import { AwesomeLayoutPageNavbarMenu, AwesomeLayoutPageNavbarMenuDropdownItem, } from './types' -import { NuxtApp } from '#app' export interface NuxtAwesomeAppConfig { /** title name */ diff --git a/app/app.config.ts b/app/app.config.ts index 64fcb65..8c79bf7 100644 --- a/app/app.config.ts +++ b/app/app.config.ts @@ -1,4 +1,4 @@ -import { AppConfigInput } from 'nuxt/schema' +import type { AppConfigInput } from 'nuxt/schema' export default defineAppConfig({ awesome: { diff --git a/app/pages/setting.vue b/app/pages/setting.vue index 6c3aa70..4df74b6 100644 --- a/app/pages/setting.vue +++ b/app/pages/setting.vue @@ -38,11 +38,11 @@ const validate = async () => { // fetch username from github api try { const response = await fetch( - `https://api.github.com/users/${username.value}` + `https://api.github.com/users/${username.value}`, ) if (response.status !== 200) { throw new Error( - `error when fetching username : ${response.statusText} (${response.status})` + `error when fetching username : ${response.statusText} (${response.status})`, ) } const data = (await response.json()) as { diff --git a/components/awesome/Button/index.vue b/components/awesome/Button/index.vue index 062fa0e..6580faa 100644 --- a/components/awesome/Button/index.vue +++ b/components/awesome/Button/index.vue @@ -49,7 +49,7 @@ const sizes = reactive<{ }) // state const selectedStyle = computed(() => - props.type in styles ? styles[props.type] : styles.primary + props.type in styles ? styles[props.type] : styles.primary, ) const selectedSize = computed(() => sizes[props.size] || sizes.lg) // methods diff --git a/components/awesome/Content/Renderer.vue b/components/awesome/Content/Renderer.vue index 875a989..3d5fdf0 100644 --- a/components/awesome/Content/Renderer.vue +++ b/components/awesome/Content/Renderer.vue @@ -11,7 +11,7 @@ const props = defineProps({ }) const { data } = await useAsyncData(props.path, () => - queryContent(props.path).findOne() + queryContent(props.path).findOne(), ) if (!data) abortNavigation('404') @@ -22,7 +22,7 @@ if (!data) abortNavigation('404') - + diff --git a/components/awesome/Form/TextInput.vue b/components/awesome/Form/TextInput.vue index caa2719..a9d675e 100644 --- a/components/awesome/Form/TextInput.vue +++ b/components/awesome/Form/TextInput.vue @@ -42,20 +42,20 @@ const modelValue = useSyncProps(props, 'modelValue', emit) const havePreEl = computed( () => typeof slots.prefix !== 'undefined' || - typeof slots['prefix-disabled'] !== 'undefined' + typeof slots['prefix-disabled'] !== 'undefined', ) const haveSuEl = computed(() => typeof slots.suffix !== 'undefined') const selectedBorderStyle = computed( - () => 'border-gray-900/10 dark:border-gray-50/[0.2]' + () => 'border-gray-900/10 dark:border-gray-50/[0.2]', ) const selectedOnHoverBorderStyle = computed( - () => 'dark:focus:border-white focus:border-gray-900' + () => 'dark:focus:border-white focus:border-gray-900', ) const selectedPaddingStyle = computed( - () => paddingStyles[props.size] || paddingStyles.md + () => paddingStyles[props.size] || paddingStyles.md, ) const selectedFontSizeStyle = computed( - () => fontSizeStyles[props.size] || fontSizeStyles.md + () => fontSizeStyles[props.size] || fontSizeStyles.md, ) diff --git a/components/awesome/Tabs.vue b/components/awesome/Tabs.vue index b29f792..658d337 100644 --- a/components/awesome/Tabs.vue +++ b/components/awesome/Tabs.vue @@ -26,7 +26,7 @@ const updateIndicator = () => { const dom = tabHeaderIndicator.value // get header tab item dom const currentActiveIndex = tabItems.value.findIndex( - ({ name }) => name === activeTab.value + ({ name }) => name === activeTab.value, ) const tabItem = tabs.value.querySelectorAll('.tabs-header-item')[ currentActiveIndex diff --git a/components/awesome/Welcome.vue b/components/awesome/Welcome.vue index 7a0f0a2..0c46946 100644 --- a/components/awesome/Welcome.vue +++ b/components/awesome/Welcome.vue @@ -10,7 +10,7 @@ const props = defineProps({ const showAlert = ref( awesome?.layout?.welcome?.disableInfoReplaceIndexInWelcomePage ? !awesome?.layout?.welcome?.disableInfoReplaceIndexInWelcomePage - : props.withAlert + : props.withAlert, ) const titlesText = computed(() => @@ -21,7 +21,7 @@ const titlesText = computed(() => ) .replaceAll(' ', '[space]') .split(' ') - .map((item) => item.replaceAll('[space]', ' ')) + .map((item) => item.replaceAll('[space]', ' ')), ) const leadingsText = computed(() => [ { @@ -80,13 +80,14 @@ const leadingsText = computed(() => [ size="lg" :text=" parseMenuTitle( - awesome?.layout?.welcome?.primaryActionButton?.title || 'Nuxt 3' + awesome?.layout?.welcome?.primaryActionButton?.title || + 'Nuxt 3', ) " :to=" parseMenuRoute( awesome?.layout?.welcome?.primaryActionButton?.to || - 'https://nuxt.com' + 'https://nuxt.com', ) " class="font-extrabold" @@ -95,19 +96,19 @@ const leadingsText = computed(() => [ v-if=" parseMenuRoute( awesome?.layout?.welcome?.secondaryActionButton?.to || - awesome?.project?.links?.github + awesome?.project?.links?.github, ) " :text=" parseMenuTitle( awesome?.layout?.welcome?.secondaryActionButton?.title || - 'Github' + 'Github', ) " :to=" parseMenuRoute( awesome?.layout?.welcome?.secondaryActionButton?.to || - awesome?.project?.links?.github + awesome?.project?.links?.github, ) " size="lg" diff --git a/components/layouts/Page/Navbar.vue b/components/layouts/Page/Navbar.vue index 253aef5..8b3d17a 100644 --- a/components/layouts/Page/Navbar.vue +++ b/components/layouts/Page/Navbar.vue @@ -6,7 +6,7 @@ const nuxtApp = useNuxtApp() const menus = computed( () => (awesome?.layout?.page?.navbar?.menus || - []) as AwesomeLayoutPageNavbarMenu[] + []) as AwesomeLayoutPageNavbarMenu[], ) // drawer diff --git a/composables/use-sync-props.ts b/composables/use-sync-props.ts index 55542ef..6013ba5 100644 --- a/composables/use-sync-props.ts +++ b/composables/use-sync-props.ts @@ -3,7 +3,7 @@ import { WritableComputedRef } from 'vue' export const useSyncProps = ( props: any, key: string, - emit: any + emit: any, ): WritableComputedRef => { return computed({ get() { diff --git a/modules/awesome.ts b/modules/awesome.ts index dec022b..788d16d 100644 --- a/modules/awesome.ts +++ b/modules/awesome.ts @@ -44,6 +44,7 @@ export default defineNuxtModule({ // example: another configs files // stores autoimports + // * this is fixed for newest pinia // : per -layers autoimports for (const layer of nuxt.options._layers) { const storesPath = resolver.resolve(layer.cwd, 'stores') diff --git a/nuxt.config.ts b/nuxt.config.ts index ae9fc9a..153b0ea 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -25,7 +25,7 @@ export default defineNuxtConfig({ // modules modules: [ // chore - // '@nuxtjs/eslint-module', + '@nuxtjs/eslint-module', // styling & ui '@nuxtjs/tailwindcss', 'nuxt-headlessui', @@ -65,7 +65,7 @@ export default defineNuxtConfig({ // module::pinia pinia: { - autoImports: [['defineStore', 'definePiniaStore']], + storesDirs: ['~/stores/**', '#/stores/**', '@/stores/**'], }, // module::headlessui diff --git a/utils/navbar.ts b/utils/navbar.ts index b69fa91..9ae20c6 100644 --- a/utils/navbar.ts +++ b/utils/navbar.ts @@ -4,7 +4,7 @@ export function parseMenuTitle(title?: string | ((nuxt: any) => string)) { return typeof title === 'function' ? title(useNuxtApp()) : title || '' } export function parseMenuRoute( - to?: RouteLocationRaw | ((nuxt: any) => RouteLocationRaw) + to?: RouteLocationRaw | ((nuxt: any) => RouteLocationRaw), ) { return typeof to === 'function' ? to(useNuxtApp()) : to }