diff --git a/biome.json b/biome.json index d3ce946..93cc04f 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.8.1/schema.json", + "$schema": "https://biomejs.dev/schemas/1.9.0/schema.json", "organizeImports": { "enabled": true, "ignore": ["node_modules/**/*", "dist/**/*", ".output", ".nuxt"] @@ -8,12 +8,17 @@ "enabled": true, "rules": { "all": true, + "suspicious": { + "noConsole": "off" + }, "correctness": { "noNodejsModules": "off", "noUndeclaredVariables": "off", "useHookAtTopLevel": "off", "noUnusedVariables": "off", - "noUnusedImports": "off" + "noUnusedImports": "off", + "noUndeclaredDependencies": "off", + "useImportExtensions": "off" }, "complexity": { "noExcessiveCognitiveComplexity": "off" @@ -57,14 +62,8 @@ } }, "nursery": { - "noDuplicateElseIf": "warn", - "noDuplicateJsonKeys": "warn", - "noEvolvingTypes": "warn", - "noYodaExpression": "warn", - "useConsistentBuiltinInstantiation": "warn", - "useErrorMessage": "warn", - "useImportExtensions": "off", - "useThrowNewError": "warn" + "noDuplicateElseIf": "error", + "noCommonJs": "error" } }, "ignore": ["node_modules/**/*", "dist/**/*", ".output", ".nuxt"] diff --git a/bun.lockb b/bun.lockb index c5e5abe..70794e9 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/components/inputs/rich-textbox-input.vue b/components/inputs/rich-textbox-input.vue index c619bbe..c89b7c2 100644 --- a/components/inputs/rich-textbox-input.vue +++ b/components/inputs/rich-textbox-input.vue @@ -56,11 +56,11 @@ const remainingCharacters = computed( ); const currentlyBeingTypedEmoji = computed(() => { const match = content.value?.match(partiallyTypedEmojiValidator); - return match ? match.at(-1)?.replace(":", "") ?? "" : null; + return match ? (match.at(-1)?.replace(":", "") ?? "") : null; }); const currentlyBeingTypedMention = computed(() => { const match = content.value?.match(partiallyTypedMentionValidator); - return match ? match.at(-1)?.replace("@", "") ?? "" : null; + return match ? (match.at(-1)?.replace("@", "") ?? "") : null; }); const autocompleteEmoji = (emoji: string) => { diff --git a/components/skeleton/Skeleton.vue b/components/skeleton/Skeleton.vue index bcbbf75..026380e 100644 --- a/components/skeleton/Skeleton.vue +++ b/components/skeleton/Skeleton.vue @@ -51,5 +51,7 @@ const getWidth = (index: number, lines: number) => { return undefined; }; -const lines = isContent.value ? props.lines ?? Math.ceil(Math.random() * 5) : 1; +const lines = isContent.value + ? (props.lines ?? Math.ceil(Math.random() * 5)) + : 1; \ No newline at end of file diff --git a/components/timelines/account.vue b/components/timelines/account.vue index c2123f0..6725a77 100644 --- a/components/timelines/account.vue +++ b/components/timelines/account.vue @@ -31,7 +31,7 @@ useListen("note:edit", (updatedNote) => { updateItem(updatedNote); }); -useListen("composer:send", (ee) => { +useListen("composer:send", () => { loadPrev(); }); \ No newline at end of file diff --git a/components/timelines/home.vue b/components/timelines/home.vue index 15ccb6b..195d573 100644 --- a/components/timelines/home.vue +++ b/components/timelines/home.vue @@ -28,7 +28,7 @@ useListen("note:edit", (updatedNote) => { updateItem(updatedNote); }); -useListen("composer:send", (ee) => { +useListen("composer:send", () => { loadPrev(); }); \ No newline at end of file diff --git a/components/timelines/local.vue b/components/timelines/local.vue index 035abcc..0395ec8 100644 --- a/components/timelines/local.vue +++ b/components/timelines/local.vue @@ -28,7 +28,7 @@ useListen("note:edit", (updatedNote) => { updateItem(updatedNote); }); -useListen("composer:send", (ee) => { +useListen("composer:send", () => { loadPrev(); }); \ No newline at end of file diff --git a/components/timelines/public.vue b/components/timelines/public.vue index 2187b20..3ada22e 100644 --- a/components/timelines/public.vue +++ b/components/timelines/public.vue @@ -28,7 +28,7 @@ useListen("note:edit", (updatedNote) => { updateItem(updatedNote); }); -useListen("composer:send", (ee) => { +useListen("composer:send", () => { loadPrev(); }); \ No newline at end of file diff --git a/components/timelines/timeline-scroller.vue b/components/timelines/timeline-scroller.vue index c8fe02b..976570f 100644 --- a/components/timelines/timeline-scroller.vue +++ b/components/timelines/timeline-scroller.vue @@ -11,7 +11,7 @@ const yStored = useLocalStorage("versia:scroll", { }); const { y } = useScroll(root); -useEventListener("popstate", async (event) => { +useEventListener("popstate", async () => { if (yStored.value[route.fullPath] !== undefined) { // Wait for the Vue component to load await new Promise((resolve) => setTimeout(resolve, 100)); diff --git a/composables/NoteData.ts b/composables/NoteData.ts index 1232196..49295b6 100644 --- a/composables/NoteData.ts +++ b/composables/NoteData.ts @@ -14,7 +14,7 @@ export const useNoteData = ( ); const renderedNote = computed(() => isReblog.value - ? toValue(noteProp)?.reblog ?? toValue(noteProp) + ? (toValue(noteProp)?.reblog ?? toValue(noteProp)) : toValue(noteProp), ); const showContentWarning = useSetting(SettingIds.ShowContentWarning); diff --git a/package.json b/package.json index a057eea..4ccb7ea 100644 --- a/package.json +++ b/package.json @@ -29,42 +29,42 @@ "check": "bunx tsc -p ." }, "dependencies": { - "@ark-ui/vue": "3.6.0", - "@nuxt/fonts": "^0.7.2", - "@tailwindcss/typography": "^0.5.14", + "@ark-ui/vue": "^3.13.0", + "@nuxt/fonts": "^0.8.0", + "@tailwindcss/typography": "^0.5.15", "@vee-validate/nuxt": "^4.13.2", "@vee-validate/zod": "^4.13.2", - "@versia/client": "^0.1.0-rc.0", - "@vite-pwa/nuxt": "^0.10.0", - "@vueuse/core": "^11.0.1", - "@vueuse/nuxt": "^11.0.1", - "c12": "^1.11.1", + "@versia/client": "^0.1.0", + "@vite-pwa/nuxt": "^0.10.5", + "@vueuse/core": "^11.0.3", + "@vueuse/nuxt": "^11.0.3", + "c12": "^1.11.2", "fastest-levenshtein": "^1.0.16", "html-to-text": "^9.0.5", "iconify-icon": "^2.1.0", "magic-regexp": "^0.8.0", "mitt": "^3.0.1", "nanoid": "^5.0.7", - "nuxt": "^3.12.4", + "nuxt": "^3.13.1", "nuxt-headlessui": "^1.2.0", "nuxt-security": "^2.0.0-rc.9", "nuxt-shiki": "^0.3.0", "overlayscrollbars": "^2.10.0", "overlayscrollbars-vue": "^0.5.9", - "shiki": "^1.14.1", - "vue": "^3.4.38", - "vue-router": "^4.4.3", + "shiki": "^1.17.6", + "vue": "^3.5.5", + "vue-router": "^4.4.5", "zod": "^3.23.8" }, "devDependencies": { - "@biomejs/biome": "^1.8.3", - "@nuxtjs/seo": "^2.0.0-rc.18", + "@biomejs/biome": "^1.9.0", + "@nuxtjs/seo": "^2.0.0-rc.21", "@nuxtjs/tailwindcss": "^6.12.1", - "@tailwindcss/forms": "^0.5.7", + "@tailwindcss/forms": "^0.5.9", "@types/html-to-text": "^9.0.4", "@vue-email/nuxt": "^0.8.19", - "typescript": "^5.5.4", - "vue-tsc": "^2.0.29" + "typescript": "^5.6.2", + "vue-tsc": "^2.1.6" }, "trustedDependencies": [ "@biomejs/biome", diff --git a/pages/oauth/authorize.vue b/pages/oauth/authorize.vue index 0ff91d9..1a9696d 100644 --- a/pages/oauth/authorize.vue +++ b/pages/oauth/authorize.vue @@ -97,8 +97,8 @@