From 0d56651220b938a8ee4089e53d833665205ba40b Mon Sep 17 00:00:00 2001 From: Will Chen Date: Tue, 6 May 2025 23:02:28 -0700 Subject: [PATCH] Run prettier on everything (#104) --- .github/ISSUE_TEMPLATE/bug_report.md | 15 +- .github/ISSUE_TEMPLATE/feature_request.md | 7 +- .prettierignore | 6 + .prettierrc | 1 + README.md | 2 +- biome.json | 114 +++--- components.json | 40 +- index.html | 2 +- package-lock.json | 17 + package.json | 5 +- scaffold/components.json | 2 +- scaffold/dyad-shim.js | 26 +- scaffold/eslint.config.js | 2 +- scaffold/index.html | 2 +- scaffold/package.json | 2 +- scaffold/postcss.config.js | 2 +- scaffold/src/components/ui/accordion.tsx | 26 +- scaffold/src/components/ui/alert-dialog.tsx | 58 +-- scaffold/src/components/ui/alert.tsx | 24 +- scaffold/src/components/ui/aspect-ratio.tsx | 6 +- scaffold/src/components/ui/avatar.tsx | 24 +- scaffold/src/components/ui/badge.tsx | 14 +- scaffold/src/components/ui/breadcrumb.tsx | 48 +-- scaffold/src/components/ui/button.tsx | 26 +- scaffold/src/components/ui/calendar.tsx | 4 +- scaffold/src/components/ui/card.tsx | 41 ++- scaffold/src/components/ui/carousel.tsx | 158 ++++---- scaffold/src/components/ui/chart.tsx | 168 ++++----- scaffold/src/components/ui/checkbox.tsx | 16 +- scaffold/src/components/ui/collapsible.tsx | 10 +- scaffold/src/components/ui/command.tsx | 62 ++-- scaffold/src/components/ui/context-menu.tsx | 82 ++--- scaffold/src/components/ui/dialog.tsx | 52 +-- scaffold/src/components/ui/drawer.tsx | 46 +-- scaffold/src/components/ui/dropdown-menu.tsx | 80 ++-- scaffold/src/components/ui/form.tsx | 101 ++--- scaffold/src/components/ui/hover-card.tsx | 18 +- scaffold/src/components/ui/input-otp.tsx | 36 +- scaffold/src/components/ui/input.tsx | 16 +- scaffold/src/components/ui/label.tsx | 18 +- scaffold/src/components/ui/menubar.tsx | 96 ++--- .../src/components/ui/navigation-menu.tsx | 54 +-- scaffold/src/components/ui/pagination.tsx | 44 +-- scaffold/src/components/ui/popover.tsx | 18 +- scaffold/src/components/ui/progress.tsx | 14 +- scaffold/src/components/ui/radio-group.tsx | 24 +- scaffold/src/components/ui/resizable.tsx | 20 +- scaffold/src/components/ui/scroll-area.tsx | 18 +- scaffold/src/components/ui/select.tsx | 56 +-- scaffold/src/components/ui/separator.tsx | 18 +- scaffold/src/components/ui/sheet.tsx | 69 ++-- scaffold/src/components/ui/sidebar.tsx | 348 +++++++++--------- scaffold/src/components/ui/skeleton.tsx | 6 +- scaffold/src/components/ui/slider.tsx | 14 +- scaffold/src/components/ui/sonner.tsx | 14 +- scaffold/src/components/ui/switch.tsx | 16 +- scaffold/src/components/ui/table.tsx | 44 +-- scaffold/src/components/ui/tabs.tsx | 28 +- scaffold/src/components/ui/textarea.tsx | 16 +- scaffold/src/components/ui/toast.tsx | 54 +-- scaffold/src/components/ui/toaster.tsx | 10 +- scaffold/src/components/ui/toggle-group.tsx | 28 +- scaffold/src/components/ui/toggle.tsx | 18 +- scaffold/src/components/ui/tooltip.tsx | 20 +- scaffold/src/globals.css | 2 +- scaffold/src/hooks/use-mobile.tsx | 24 +- scaffold/src/hooks/use-toast.ts | 129 ++++--- scaffold/src/lib/utils.ts | 6 +- scaffold/src/pages/Index.tsx | 4 +- scaffold/src/pages/NotFound.tsx | 2 +- scaffold/vite.config.ts | 6 +- scripts/README.md | 2 +- src/__tests__/README.md | 12 +- src/__tests__/chat_stream_handlers.test.ts | 62 ++-- src/app/TitleBar.tsx | 2 +- src/components/ErrorBoundary.tsx | 4 +- src/components/GitHubConnector.tsx | 14 +- src/components/GitHubIntegration.tsx | 2 +- src/components/HelpDialog.tsx | 15 +- src/components/ModelPicker.tsx | 8 +- src/components/ProviderSettings.tsx | 2 +- src/components/SetupBanner.tsx | 16 +- src/components/SupabaseConnector.tsx | 4 +- src/components/SupabaseIntegration.tsx | 2 +- src/components/TelemetryBanner.tsx | 2 +- src/components/chat/ChatError.tsx | 1 - src/components/chat/ChatInput.tsx | 14 +- src/components/chat/CodeHighlight.tsx | 4 +- src/components/chat/DyadAddDependency.tsx | 2 +- src/components/chat/DyadExecuteSql.tsx | 4 +- src/components/chat/DyadMarkdownParser.tsx | 4 +- src/components/chat/DyadWrite.tsx | 4 +- src/components/chat/MessagesList.tsx | 31 +- src/components/chat/VersionPane.tsx | 10 +- .../preview_panel/PreviewIframe.tsx | 8 +- src/components/preview_panel/PreviewPanel.tsx | 2 +- .../settings/ProviderSettingsPage.tsx | 8 +- src/components/ui/accordion.tsx | 20 +- src/components/ui/alert.tsx | 22 +- src/components/ui/button.tsx | 2 +- src/components/ui/card.tsx | 4 +- src/components/ui/dialog.tsx | 36 +- src/components/ui/dropdown-menu.tsx | 16 +- src/components/ui/input.tsx | 10 +- src/components/ui/label.tsx | 12 +- src/components/ui/popover.tsx | 2 +- src/components/ui/select.tsx | 44 +-- src/components/ui/separator.tsx | 14 +- src/components/ui/sheet.tsx | 36 +- src/components/ui/sidebar.tsx | 32 +- src/components/ui/skeleton.tsx | 6 +- src/components/ui/switch.tsx | 14 +- src/components/ui/toggle-group.tsx | 24 +- src/components/ui/toggle.tsx | 18 +- src/components/ui/tooltip.tsx | 20 +- src/constants/models.ts | 2 +- src/contexts/ThemeContext.tsx | 2 +- src/db/index.ts | 2 +- src/hooks/use-mobile.ts | 2 - src/hooks/useCountTokens.ts | 2 +- src/hooks/useLoadAppFile.ts | 4 +- src/hooks/useProposal.ts | 4 +- src/hooks/useRunApp.ts | 14 +- src/hooks/useSettings.ts | 4 +- src/hooks/useStreamChat.ts | 2 +- src/hooks/useSupabase.ts | 8 +- src/hooks/useVersions.ts | 2 +- src/ipc/handlers/app_handlers.ts | 52 +-- src/ipc/handlers/chat_handlers.ts | 4 +- src/ipc/handlers/chat_stream_handlers.ts | 59 +-- src/ipc/handlers/debug_handlers.ts | 4 +- src/ipc/handlers/dependency_handlers.ts | 10 +- src/ipc/handlers/github_handlers.ts | 22 +- .../handlers/local_model_lmstudio_handler.ts | 21 +- .../handlers/local_model_ollama_handler.ts | 36 +- src/ipc/handlers/node_handlers.ts | 4 +- src/ipc/handlers/proposal_handlers.ts | 54 +-- src/ipc/handlers/settings_handlers.ts | 4 +- src/ipc/handlers/supabase_handlers.ts | 4 +- src/ipc/handlers/testing_chat_handlers.ts | 2 +- src/ipc/handlers/token_count_handlers.ts | 6 +- src/ipc/handlers/upload_handlers.ts | 4 +- src/ipc/handlers/version_handlers.ts | 23 +- src/ipc/ipc_client.ts | 64 ++-- src/ipc/processors/executeAddDependency.ts | 10 +- src/ipc/processors/response_processor.ts | 14 +- src/ipc/utils/file_utils.ts | 2 +- src/ipc/utils/get_model_client.ts | 8 +- src/ipc/utils/lock_utils.ts | 2 +- src/ipc/utils/process_manager.ts | 18 +- src/ipc/utils/runShellCommand.ts | 2 +- src/ipc/utils/token_utils.ts | 4 +- src/lib/chat.ts | 2 +- src/lib/schemas.ts | 2 +- src/lib/toast.ts | 4 +- src/main.ts | 10 +- src/main/settings.ts | 8 +- src/pages/app-details.tsx | 4 +- src/pages/chat.tsx | 2 +- src/pages/home.tsx | 2 +- src/pages/settings.tsx | 2 +- src/preload.ts | 4 +- src/renderer.tsx | 6 +- src/styles/globals.css | 152 ++++---- src/supabase_admin/supabase_context.ts | 4 +- .../supabase_management_client.ts | 24 +- src/utils/codebase.ts | 8 +- vite.preload.config.mts | 2 +- 168 files changed, 1980 insertions(+), 1907 deletions(-) create mode 100644 .prettierignore create mode 100644 .prettierrc diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2fcf1c6..dd00c08 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,10 +1,9 @@ --- name: Bug report about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - +title: "" +labels: "" +assignees: "" --- **Describe the bug** @@ -12,6 +11,7 @@ A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,9 +24,10 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] + +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] **Additional context** Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7..2bc5d5f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,10 +1,9 @@ --- name: Feature request about: Suggest an idea for this project -title: '' -labels: '' -assignees: '' - +title: "" +labels: "" +assignees: "" --- **Is your feature request related to a problem? Please describe.** diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..785f0fb --- /dev/null +++ b/.prettierignore @@ -0,0 +1,6 @@ +# Ignore artifacts: +build +coverage +# generated files +drizzle/ +**/pnpm-lock.yaml \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/.prettierrc @@ -0,0 +1 @@ +{} diff --git a/README.md b/README.md index 9eaa2e2..3b74163 100644 --- a/README.md +++ b/README.md @@ -20,4 +20,4 @@ No sign-up required. Just download and go. ## 🎥 Preview -**dyad** is open source (Apache 2.0-licensed). +**dyad** is open source (Apache 2.0-licensed). diff --git a/biome.json b/biome.json index b50a39d..2aa55a6 100644 --- a/biome.json +++ b/biome.json @@ -1,59 +1,59 @@ { - "$schema": "https://biomejs.dev/schemas/1.4.1/schema.json", - "vcs": { - "useIgnoreFile": true - }, - "files": { - "ignore": [ - "**/static/build/**", - "**/third_party/**", - "third_party/**", - "**/external/**", - "tools/**", - "mesop/**/*.json", - "scripts/**", - "**/esbuild*", - "**/venv/**" - ] - }, - "organizeImports": { - "enabled": true - }, - "linter": { - "enabled": true, - "rules": { - "recommended": true, - "correctness": { - "noUnusedImports": "error" - }, - "complexity": { - "useLiteralKeys": "off", - "noForEach": "off" - }, - "style": { - "noParameterAssign": "off", - "noNonNullAssertion": "off" - }, - "suspicious": { - "noExplicitAny": "off", - "noFallthroughSwitchClause": "off", - "noPrototypeBuiltins": "off", - "noArrayIndexKey": "off" - }, - "a11y": { - "useButtonType": "off", - "useIframeTitle": "off", - "noLabelWithoutControl": "off", - "noSvgWithoutTitle": "off" - } - } - }, - "formatter": { - "enabled": false - }, - "javascript": { - "parser": { - "unsafeParameterDecoratorsEnabled": true - } + "$schema": "https://biomejs.dev/schemas/1.4.1/schema.json", + "vcs": { + "useIgnoreFile": true + }, + "files": { + "ignore": [ + "**/static/build/**", + "**/third_party/**", + "third_party/**", + "**/external/**", + "tools/**", + "mesop/**/*.json", + "scripts/**", + "**/esbuild*", + "**/venv/**" + ] + }, + "organizeImports": { + "enabled": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "correctness": { + "noUnusedImports": "error" + }, + "complexity": { + "useLiteralKeys": "off", + "noForEach": "off" + }, + "style": { + "noParameterAssign": "off", + "noNonNullAssertion": "off" + }, + "suspicious": { + "noExplicitAny": "off", + "noFallthroughSwitchClause": "off", + "noPrototypeBuiltins": "off", + "noArrayIndexKey": "off" + }, + "a11y": { + "useButtonType": "off", + "useIframeTitle": "off", + "noLabelWithoutControl": "off", + "noSvgWithoutTitle": "off" + } } -} \ No newline at end of file + }, + "formatter": { + "enabled": false + }, + "javascript": { + "parser": { + "unsafeParameterDecoratorsEnabled": true + } + } +} diff --git a/components.json b/components.json index 11e8caf..285033d 100644 --- a/components.json +++ b/components.json @@ -1,21 +1,21 @@ { - "$schema": "https://ui.shadcn.com/schema.json", - "style": "new-york", - "rsc": false, - "tsx": true, - "tailwind": { - "config": "", - "css": "src/styles/globals.css", - "baseColor": "neutral", - "cssVariables": true, - "prefix": "" - }, - "aliases": { - "components": "@/components", - "utils": "@/lib/utils", - "ui": "@/components/ui", - "lib": "@/lib", - "hooks": "@/hooks" - }, - "iconLibrary": "lucide" -} \ No newline at end of file + "$schema": "https://ui.shadcn.com/schema.json", + "style": "new-york", + "rsc": false, + "tsx": true, + "tailwind": { + "config": "", + "css": "src/styles/globals.css", + "baseColor": "neutral", + "cssVariables": true, + "prefix": "" + }, + "aliases": { + "components": "@/components", + "utils": "@/lib/utils", + "ui": "@/components/ui", + "lib": "@/lib", + "hooks": "@/hooks" + }, + "iconLibrary": "lucide" +} diff --git a/index.html b/index.html index aacab56..3d0b491 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + diff --git a/package-lock.json b/package-lock.json index 7e4af91..0b0cc4b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -97,6 +97,7 @@ "eslint": "^8.57.1", "eslint-plugin-import": "^2.31.0", "happy-dom": "^17.4.4", + "prettier": "3.5.3", "typescript": "^5.8.3", "vite": "^5.4.17", "vitest": "^3.1.1" @@ -15048,6 +15049,22 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", + "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-format": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", diff --git a/package.json b/package.json index 5fda192..8c932b5 100644 --- a/package.json +++ b/package.json @@ -58,15 +58,16 @@ "eslint": "^8.57.1", "eslint-plugin-import": "^2.31.0", "happy-dom": "^17.4.4", + "prettier": "3.5.3", "typescript": "^5.8.3", "vite": "^5.4.17", "vitest": "^3.1.1" }, "dependencies": { - "@ai-sdk/openai-compatible": "^0.2.13", "@ai-sdk/anthropic": "^1.2.8", "@ai-sdk/google": "^1.2.10", "@ai-sdk/openai": "^1.3.7", + "@ai-sdk/openai-compatible": "^0.2.13", "@biomejs/biome": "^1.9.4", "@dyad-sh/supabase-management-js": "v1.0.0", "@monaco-editor/react": "^4.7.0-rc.0", @@ -126,4 +127,4 @@ "update-electron-app": "^3.1.1", "uuid": "^11.1.0" } -} \ No newline at end of file +} diff --git a/scaffold/components.json b/scaffold/components.json index f29e3f1..62e1011 100644 --- a/scaffold/components.json +++ b/scaffold/components.json @@ -17,4 +17,4 @@ "lib": "@/lib", "hooks": "@/hooks" } -} \ No newline at end of file +} diff --git a/scaffold/dyad-shim.js b/scaffold/dyad-shim.js index b892ef2..bf204d9 100644 --- a/scaffold/dyad-shim.js +++ b/scaffold/dyad-shim.js @@ -32,12 +32,12 @@ type: navigationType, payload: { oldUrl: oldUrlForMessage, newUrl: newUrl }, }, - PARENT_TARGET_ORIGIN + PARENT_TARGET_ORIGIN, ); } catch (e) { console.error( `[vite-dev-plugin] Error calling original ${navigationType}: `, - e + e, ); window.parent.postMessage( { @@ -50,7 +50,7 @@ urlAttempted: url, }, }, - PARENT_TARGET_ORIGIN + PARENT_TARGET_ORIGIN, ); } }; @@ -98,7 +98,7 @@ error?.stack || "", }, }, - PARENT_TARGET_ORIGIN + PARENT_TARGET_ORIGIN, ); return; } @@ -119,13 +119,13 @@ type: "iframe-sourcemapped-error", payload: { ...payload, originalSourceType: sourceType }, }, - PARENT_TARGET_ORIGIN + PARENT_TARGET_ORIGIN, ); }) .catch((mappingError) => { console.error( "[vite-dev-plugin] Error during stacktrace sourcemapping:", - mappingError + mappingError, ); const payload = { @@ -141,7 +141,7 @@ type: "iframe-sourcemapped-error", payload: { ...payload, originalSourceType: sourceType }, }, - PARENT_TARGET_ORIGIN + PARENT_TARGET_ORIGIN, ); }); } @@ -157,7 +157,7 @@ stack: "", }, }, - PARENT_TARGET_ORIGIN + PARENT_TARGET_ORIGIN, ); return; } @@ -176,7 +176,7 @@ "", }, }, - PARENT_TARGET_ORIGIN + PARENT_TARGET_ORIGIN, ); return; } @@ -223,7 +223,7 @@ frame: node.shadowRoot.querySelector(".frame").textContent, }, }, - PARENT_TARGET_ORIGIN + PARENT_TARGET_ORIGIN, ); } catch (error) { console.error("Could not report vite error overlay", error); @@ -236,7 +236,7 @@ document.addEventListener("DOMContentLoaded", () => { if (!document.body) { console.error( - "document.body does not exist - something very weird happened" + "document.body does not exist - something very weird happened", ); return; } @@ -249,12 +249,12 @@ observer.observe(document.body, config); }); console.log( - "Document loading, waiting for DOMContentLoaded to set up observer." + "Document loading, waiting for DOMContentLoaded to set up observer.", ); } else { if (!document.body) { console.error( - "document.body does not exist - something very weird happened" + "document.body does not exist - something very weird happened", ); return; } diff --git a/scaffold/eslint.config.js b/scaffold/eslint.config.js index e67846f..9dd057a 100644 --- a/scaffold/eslint.config.js +++ b/scaffold/eslint.config.js @@ -25,5 +25,5 @@ export default tseslint.config( ], "@typescript-eslint/no-unused-vars": "off", }, - } + }, ); diff --git a/scaffold/index.html b/scaffold/index.html index b38b0a8..6595328 100644 --- a/scaffold/index.html +++ b/scaffold/index.html @@ -1,4 +1,4 @@ - + diff --git a/scaffold/package.json b/scaffold/package.json index 9a94ca2..470a8b1 100644 --- a/scaffold/package.json +++ b/scaffold/package.json @@ -80,4 +80,4 @@ "typescript-eslint": "^8.0.1", "vite": "^6.3.4" } -} \ No newline at end of file +} diff --git a/scaffold/postcss.config.js b/scaffold/postcss.config.js index 2e7af2b..2aa7205 100644 --- a/scaffold/postcss.config.js +++ b/scaffold/postcss.config.js @@ -3,4 +3,4 @@ export default { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/scaffold/src/components/ui/accordion.tsx b/scaffold/src/components/ui/accordion.tsx index e6a723d..83ff017 100644 --- a/scaffold/src/components/ui/accordion.tsx +++ b/scaffold/src/components/ui/accordion.tsx @@ -1,10 +1,10 @@ -import * as React from "react" -import * as AccordionPrimitive from "@radix-ui/react-accordion" -import { ChevronDown } from "lucide-react" +import * as React from "react"; +import * as AccordionPrimitive from "@radix-ui/react-accordion"; +import { ChevronDown } from "lucide-react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; -const Accordion = AccordionPrimitive.Root +const Accordion = AccordionPrimitive.Root; const AccordionItem = React.forwardRef< React.ElementRef, @@ -15,8 +15,8 @@ const AccordionItem = React.forwardRef< className={cn("border-b", className)} {...props} /> -)) -AccordionItem.displayName = "AccordionItem" +)); +AccordionItem.displayName = "AccordionItem"; const AccordionTrigger = React.forwardRef< React.ElementRef, @@ -27,7 +27,7 @@ const AccordionTrigger = React.forwardRef< ref={ref} className={cn( "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180", - className + className, )} {...props} > @@ -35,8 +35,8 @@ const AccordionTrigger = React.forwardRef< -)) -AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName +)); +AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName; const AccordionContent = React.forwardRef< React.ElementRef, @@ -49,8 +49,8 @@ const AccordionContent = React.forwardRef< >
{children}
-)) +)); -AccordionContent.displayName = AccordionPrimitive.Content.displayName +AccordionContent.displayName = AccordionPrimitive.Content.displayName; -export { Accordion, AccordionItem, AccordionTrigger, AccordionContent } +export { Accordion, AccordionItem, AccordionTrigger, AccordionContent }; diff --git a/scaffold/src/components/ui/alert-dialog.tsx b/scaffold/src/components/ui/alert-dialog.tsx index 8722561..2350014 100644 --- a/scaffold/src/components/ui/alert-dialog.tsx +++ b/scaffold/src/components/ui/alert-dialog.tsx @@ -1,14 +1,14 @@ -import * as React from "react" -import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" +import * as React from "react"; +import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog"; -import { cn } from "@/lib/utils" -import { buttonVariants } from "@/components/ui/button" +import { cn } from "@/lib/utils"; +import { buttonVariants } from "@/components/ui/button"; -const AlertDialog = AlertDialogPrimitive.Root +const AlertDialog = AlertDialogPrimitive.Root; -const AlertDialogTrigger = AlertDialogPrimitive.Trigger +const AlertDialogTrigger = AlertDialogPrimitive.Trigger; -const AlertDialogPortal = AlertDialogPrimitive.Portal +const AlertDialogPortal = AlertDialogPrimitive.Portal; const AlertDialogOverlay = React.forwardRef< React.ElementRef, @@ -17,13 +17,13 @@ const AlertDialogOverlay = React.forwardRef< -)) -AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName +)); +AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName; const AlertDialogContent = React.forwardRef< React.ElementRef, @@ -35,13 +35,13 @@ const AlertDialogContent = React.forwardRef< ref={ref} className={cn( "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg", - className + className, )} {...props} /> -)) -AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName +)); +AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName; const AlertDialogHeader = ({ className, @@ -50,12 +50,12 @@ const AlertDialogHeader = ({
-) -AlertDialogHeader.displayName = "AlertDialogHeader" +); +AlertDialogHeader.displayName = "AlertDialogHeader"; const AlertDialogFooter = ({ className, @@ -64,12 +64,12 @@ const AlertDialogFooter = ({
-) -AlertDialogFooter.displayName = "AlertDialogFooter" +); +AlertDialogFooter.displayName = "AlertDialogFooter"; const AlertDialogTitle = React.forwardRef< React.ElementRef, @@ -80,8 +80,8 @@ const AlertDialogTitle = React.forwardRef< className={cn("text-lg font-semibold", className)} {...props} /> -)) -AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName +)); +AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName; const AlertDialogDescription = React.forwardRef< React.ElementRef, @@ -92,9 +92,9 @@ const AlertDialogDescription = React.forwardRef< className={cn("text-sm text-muted-foreground", className)} {...props} /> -)) +)); AlertDialogDescription.displayName = - AlertDialogPrimitive.Description.displayName + AlertDialogPrimitive.Description.displayName; const AlertDialogAction = React.forwardRef< React.ElementRef, @@ -105,8 +105,8 @@ const AlertDialogAction = React.forwardRef< className={cn(buttonVariants(), className)} {...props} /> -)) -AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName +)); +AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName; const AlertDialogCancel = React.forwardRef< React.ElementRef, @@ -117,12 +117,12 @@ const AlertDialogCancel = React.forwardRef< className={cn( buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", - className + className, )} {...props} /> -)) -AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName +)); +AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName; export { AlertDialog, @@ -136,4 +136,4 @@ export { AlertDialogDescription, AlertDialogAction, AlertDialogCancel, -} +}; diff --git a/scaffold/src/components/ui/alert.tsx b/scaffold/src/components/ui/alert.tsx index 41fa7e0..13219e7 100644 --- a/scaffold/src/components/ui/alert.tsx +++ b/scaffold/src/components/ui/alert.tsx @@ -1,7 +1,7 @@ -import * as React from "react" -import { cva, type VariantProps } from "class-variance-authority" +import * as React from "react"; +import { cva, type VariantProps } from "class-variance-authority"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const alertVariants = cva( "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", @@ -16,8 +16,8 @@ const alertVariants = cva( defaultVariants: { variant: "default", }, - } -) + }, +); const Alert = React.forwardRef< HTMLDivElement, @@ -29,8 +29,8 @@ const Alert = React.forwardRef< className={cn(alertVariants({ variant }), className)} {...props} /> -)) -Alert.displayName = "Alert" +)); +Alert.displayName = "Alert"; const AlertTitle = React.forwardRef< HTMLParagraphElement, @@ -41,8 +41,8 @@ const AlertTitle = React.forwardRef< className={cn("mb-1 font-medium leading-none tracking-tight", className)} {...props} /> -)) -AlertTitle.displayName = "AlertTitle" +)); +AlertTitle.displayName = "AlertTitle"; const AlertDescription = React.forwardRef< HTMLParagraphElement, @@ -53,7 +53,7 @@ const AlertDescription = React.forwardRef< className={cn("text-sm [&_p]:leading-relaxed", className)} {...props} /> -)) -AlertDescription.displayName = "AlertDescription" +)); +AlertDescription.displayName = "AlertDescription"; -export { Alert, AlertTitle, AlertDescription } +export { Alert, AlertTitle, AlertDescription }; diff --git a/scaffold/src/components/ui/aspect-ratio.tsx b/scaffold/src/components/ui/aspect-ratio.tsx index c4abbf3..c9e6f4b 100644 --- a/scaffold/src/components/ui/aspect-ratio.tsx +++ b/scaffold/src/components/ui/aspect-ratio.tsx @@ -1,5 +1,5 @@ -import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" +import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio"; -const AspectRatio = AspectRatioPrimitive.Root +const AspectRatio = AspectRatioPrimitive.Root; -export { AspectRatio } +export { AspectRatio }; diff --git a/scaffold/src/components/ui/avatar.tsx b/scaffold/src/components/ui/avatar.tsx index 991f56e..444b1db 100644 --- a/scaffold/src/components/ui/avatar.tsx +++ b/scaffold/src/components/ui/avatar.tsx @@ -1,7 +1,7 @@ -import * as React from "react" -import * as AvatarPrimitive from "@radix-ui/react-avatar" +import * as React from "react"; +import * as AvatarPrimitive from "@radix-ui/react-avatar"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const Avatar = React.forwardRef< React.ElementRef, @@ -11,12 +11,12 @@ const Avatar = React.forwardRef< ref={ref} className={cn( "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", - className + className, )} {...props} /> -)) -Avatar.displayName = AvatarPrimitive.Root.displayName +)); +Avatar.displayName = AvatarPrimitive.Root.displayName; const AvatarImage = React.forwardRef< React.ElementRef, @@ -27,8 +27,8 @@ const AvatarImage = React.forwardRef< className={cn("aspect-square h-full w-full", className)} {...props} /> -)) -AvatarImage.displayName = AvatarPrimitive.Image.displayName +)); +AvatarImage.displayName = AvatarPrimitive.Image.displayName; const AvatarFallback = React.forwardRef< React.ElementRef, @@ -38,11 +38,11 @@ const AvatarFallback = React.forwardRef< ref={ref} className={cn( "flex h-full w-full items-center justify-center rounded-full bg-muted", - className + className, )} {...props} /> -)) -AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName +)); +AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName; -export { Avatar, AvatarImage, AvatarFallback } +export { Avatar, AvatarImage, AvatarFallback }; diff --git a/scaffold/src/components/ui/badge.tsx b/scaffold/src/components/ui/badge.tsx index f000e3e..d3d5d60 100644 --- a/scaffold/src/components/ui/badge.tsx +++ b/scaffold/src/components/ui/badge.tsx @@ -1,7 +1,7 @@ -import * as React from "react" -import { cva, type VariantProps } from "class-variance-authority" +import * as React from "react"; +import { cva, type VariantProps } from "class-variance-authority"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const badgeVariants = cva( "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", @@ -20,8 +20,8 @@ const badgeVariants = cva( defaultVariants: { variant: "default", }, - } -) + }, +); export interface BadgeProps extends React.HTMLAttributes, @@ -30,7 +30,7 @@ export interface BadgeProps function Badge({ className, variant, ...props }: BadgeProps) { return (
- ) + ); } -export { Badge, badgeVariants } +export { Badge, badgeVariants }; diff --git a/scaffold/src/components/ui/breadcrumb.tsx b/scaffold/src/components/ui/breadcrumb.tsx index 71a5c32..6934f83 100644 --- a/scaffold/src/components/ui/breadcrumb.tsx +++ b/scaffold/src/components/ui/breadcrumb.tsx @@ -1,16 +1,16 @@ -import * as React from "react" -import { Slot } from "@radix-ui/react-slot" -import { ChevronRight, MoreHorizontal } from "lucide-react" +import * as React from "react"; +import { Slot } from "@radix-ui/react-slot"; +import { ChevronRight, MoreHorizontal } from "lucide-react"; -import { cn } from "@/lib/utils" +import { cn } from "@/lib/utils"; const Breadcrumb = React.forwardRef< HTMLElement, React.ComponentPropsWithoutRef<"nav"> & { - separator?: React.ReactNode + separator?: React.ReactNode; } ->(({ ...props }, ref) =>