refactor: additional Nuxt review findings#15
Merged
Conversation
- Remove unused @vueuse/nuxt module and dependency - Update compatibilityDate to 2025-03-01 for Nuxt 4 - Re-enable @typescript-eslint/no-explicit-any (no violations found) - Extract usePageSeo composable to deduplicate SEO meta across pages - Extract shared ContentButton type to replace duplicated inline types - Optimize [slug] pages to query by stem instead of fetching all entries - Add defineOgImage() to all pages for proper OG image generation - Document dangerous-clean-slate rationale in deploy workflow https://claude.ai/code/session_01D9Js2socgpErtmsWh88fMj
eacbce3 to
30415f9
Compare
Owner
Author
|
@claude fix the lint |
Owner
Author
|
Fixed! The lint failure was |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses the additional observations from the initial code review (#14). These are deeper structural improvements to align with Nuxt best practices.
Changes
@vueuse/nuxt— Module was registered but no VueUse composables are used in the codebase.useColorModeis already provided by Nuxt UI.compatibilityDate— Bumped from2024-11-01to2025-03-01to match Nuxt 4.@typescript-eslint/no-explicit-any— Was globally disabled but noanyusages exist in the codebase. Removed the override to keep the stricter default.usePageSeocomposable — Replaces 5 duplicateduseSeoMeta({ title, ogTitle, description, ogDescription })blocks across all pages with a single composable inapp/composables/usePageSeo.ts.ContentButtontype —LabsTeaserandSpeakingTeaserboth had identical 7-line inline button types. Moved toapp/utils/types.tsand referenced via Nuxt auto-import.[slug]page queries — Bothlabs/[slug].vueandspeaking/[slug].vuewere fetching ALL entries, sorting, then filtering by slug. Now they query directly bystemwhich is more efficient.defineOgImage()— Thenuxt-og-imagemodule was installed but never activated. AddeddefineOgImage()to all 5 pages so OG images are generated from page meta.dangerous-clean-slate: trueis used in the FTP deploy step.Test plan
pnpm run lintpassespnpm run typecheckpasses/__og-image__/routeshttps://claude.ai/code/session_01D9Js2socgpErtmsWh88fMj