From ef51900468b28a17f8668af4e632be6014c9392c Mon Sep 17 00:00:00 2001 From: Owais Jamil Date: Tue, 24 Mar 2026 23:51:25 -0500 Subject: [PATCH] chore: prettier --- .gitignore | 1 + apps/twisted/src/App.vue | 2 +- .../src/components/common/ActivityCard.vue | 210 +++--- .../src/components/common/EmptyState.vue | 90 +-- .../src/components/common/ErrorBoundary.vue | 106 ++-- .../src/components/common/RepoCard.vue | 290 ++++----- .../src/components/common/SkeletonLoader.vue | 244 +++---- .../src/components/common/UserCard.vue | 232 +++---- .../src/components/repo/CommentThread.vue | 132 ++-- .../src/components/repo/FileTreeItem.vue | 126 ++-- apps/twisted/src/core/config/project.ts | 2 +- apps/twisted/src/core/query/client.ts | 6 +- .../src/features/profile/UserProfilePage.vue | 599 +++++++++--------- .../src/features/profile/UserStrings.vue | 184 +++--- .../src/features/repo/IssueDetailPage.vue | 368 ++++++----- .../features/repo/PullRequestDetailPage.vue | 432 +++++++------ .../src/features/repo/RepoDetailPage.vue | 283 ++++----- apps/twisted/src/features/repo/RepoFiles.vue | 423 ++++++------- apps/twisted/src/features/repo/RepoIssues.vue | 286 ++++----- apps/twisted/src/lib/html.ts | 5 +- .../src/services/project-api/queries.ts | 22 +- apps/twisted/src/views/HomePage.vue | 44 +- apps/twisted/src/vite-env.d.ts | 6 +- 23 files changed, 2023 insertions(+), 2070 deletions(-) diff --git a/.gitignore b/.gitignore index f4fdc28..d877474 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ plugins www *.db +.env diff --git a/apps/twisted/src/App.vue b/apps/twisted/src/App.vue index c9462b9..703563b 100644 --- a/apps/twisted/src/App.vue +++ b/apps/twisted/src/App.vue @@ -5,5 +5,5 @@ diff --git a/apps/twisted/src/components/common/ActivityCard.vue b/apps/twisted/src/components/common/ActivityCard.vue index 8c9d398..d6f425b 100644 --- a/apps/twisted/src/components/common/ActivityCard.vue +++ b/apps/twisted/src/components/common/ActivityCard.vue @@ -16,124 +16,124 @@ diff --git a/apps/twisted/src/components/common/EmptyState.vue b/apps/twisted/src/components/common/EmptyState.vue index 15b2812..f0f79b6 100644 --- a/apps/twisted/src/components/common/EmptyState.vue +++ b/apps/twisted/src/components/common/EmptyState.vue @@ -12,59 +12,59 @@ diff --git a/apps/twisted/src/components/common/ErrorBoundary.vue b/apps/twisted/src/components/common/ErrorBoundary.vue index a684281..1471856 100644 --- a/apps/twisted/src/components/common/ErrorBoundary.vue +++ b/apps/twisted/src/components/common/ErrorBoundary.vue @@ -18,68 +18,68 @@ diff --git a/apps/twisted/src/components/common/RepoCard.vue b/apps/twisted/src/components/common/RepoCard.vue index 48f49d2..d013efb 100644 --- a/apps/twisted/src/components/common/RepoCard.vue +++ b/apps/twisted/src/components/common/RepoCard.vue @@ -25,152 +25,152 @@ diff --git a/apps/twisted/src/components/common/SkeletonLoader.vue b/apps/twisted/src/components/common/SkeletonLoader.vue index e4c1a2d..776b5d1 100644 --- a/apps/twisted/src/components/common/SkeletonLoader.vue +++ b/apps/twisted/src/components/common/SkeletonLoader.vue @@ -37,130 +37,130 @@ diff --git a/apps/twisted/src/components/common/UserCard.vue b/apps/twisted/src/components/common/UserCard.vue index 86b7491..597966c 100644 --- a/apps/twisted/src/components/common/UserCard.vue +++ b/apps/twisted/src/components/common/UserCard.vue @@ -29,128 +29,128 @@ diff --git a/apps/twisted/src/components/repo/CommentThread.vue b/apps/twisted/src/components/repo/CommentThread.vue index 9b41b5b..366bf63 100644 --- a/apps/twisted/src/components/repo/CommentThread.vue +++ b/apps/twisted/src/components/repo/CommentThread.vue @@ -14,85 +14,85 @@ diff --git a/apps/twisted/src/components/repo/FileTreeItem.vue b/apps/twisted/src/components/repo/FileTreeItem.vue index 730c2e3..cdf0690 100644 --- a/apps/twisted/src/components/repo/FileTreeItem.vue +++ b/apps/twisted/src/components/repo/FileTreeItem.vue @@ -12,81 +12,81 @@ diff --git a/apps/twisted/src/core/config/project.ts b/apps/twisted/src/core/config/project.ts index aaf34d5..7946709 100644 --- a/apps/twisted/src/core/config/project.ts +++ b/apps/twisted/src/core/config/project.ts @@ -1,4 +1,4 @@ -const rawTwisterApiBaseUrl = import.meta.env.VITE_TWISTER_API_BASE_URL?.trim() ?? "http://localhost:8080/"; +const rawTwisterApiBaseUrl = import.meta.env.VITE_TWISTER_API_BASE_URL?.trim() ?? "http://127.0.0.1:8080"; export const twisterApiBaseUrl = rawTwisterApiBaseUrl.replace(/\/+$/, ""); export const hasTwisterApi = twisterApiBaseUrl.length > 0; diff --git a/apps/twisted/src/core/query/client.ts b/apps/twisted/src/core/query/client.ts index a398b2e..10762a2 100644 --- a/apps/twisted/src/core/query/client.ts +++ b/apps/twisted/src/core/query/client.ts @@ -4,10 +4,6 @@ const isDev = import.meta.env.DEV; export const queryClient = new QueryClient({ defaultOptions: { - queries: { - staleTime: isDev ? 0 : 5 * 60 * 1000, - gcTime: isDev ? 0 : 10 * 60 * 1000, - retry: isDev ? 0 : 2, - }, + queries: { staleTime: isDev ? 0 : 5 * 60 * 1000, gcTime: isDev ? 0 : 10 * 60 * 1000, retry: isDev ? 0 : 2 }, }, }); diff --git a/apps/twisted/src/features/profile/UserProfilePage.vue b/apps/twisted/src/features/profile/UserProfilePage.vue index 8d1a9dd..d33752b 100644 --- a/apps/twisted/src/features/profile/UserProfilePage.vue +++ b/apps/twisted/src/features/profile/UserProfilePage.vue @@ -144,309 +144,308 @@ diff --git a/apps/twisted/src/features/profile/UserStrings.vue b/apps/twisted/src/features/profile/UserStrings.vue index 0d05c79..8792506 100644 --- a/apps/twisted/src/features/profile/UserStrings.vue +++ b/apps/twisted/src/features/profile/UserStrings.vue @@ -28,99 +28,99 @@ diff --git a/apps/twisted/src/features/repo/IssueDetailPage.vue b/apps/twisted/src/features/repo/IssueDetailPage.vue index 3077631..9c7f09e 100644 --- a/apps/twisted/src/features/repo/IssueDetailPage.vue +++ b/apps/twisted/src/features/repo/IssueDetailPage.vue @@ -74,195 +74,187 @@ diff --git a/apps/twisted/src/features/repo/PullRequestDetailPage.vue b/apps/twisted/src/features/repo/PullRequestDetailPage.vue index 1be7900..a21eeb5 100644 --- a/apps/twisted/src/features/repo/PullRequestDetailPage.vue +++ b/apps/twisted/src/features/repo/PullRequestDetailPage.vue @@ -83,227 +83,219 @@ diff --git a/apps/twisted/src/features/repo/RepoDetailPage.vue b/apps/twisted/src/features/repo/RepoDetailPage.vue index af3795d..23e9370 100644 --- a/apps/twisted/src/features/repo/RepoDetailPage.vue +++ b/apps/twisted/src/features/repo/RepoDetailPage.vue @@ -43,11 +43,7 @@ :repo="repo" :commits="commits" :markdown-context="markdownContext" /> - + diff --git a/apps/twisted/src/features/repo/RepoFiles.vue b/apps/twisted/src/features/repo/RepoFiles.vue index 9ded590..1af6f5c 100644 --- a/apps/twisted/src/features/repo/RepoFiles.vue +++ b/apps/twisted/src/features/repo/RepoFiles.vue @@ -36,10 +36,7 @@ {{ formatSize(blobQuery.data.value.size) }} -
+
{{ blobQuery.data.value.content }}
@@ -67,229 +64,229 @@ diff --git a/apps/twisted/src/features/repo/RepoIssues.vue b/apps/twisted/src/features/repo/RepoIssues.vue index 6c5f61a..2cf9c07 100644 --- a/apps/twisted/src/features/repo/RepoIssues.vue +++ b/apps/twisted/src/features/repo/RepoIssues.vue @@ -55,150 +55,150 @@ diff --git a/apps/twisted/src/lib/html.ts b/apps/twisted/src/lib/html.ts index 2e2e2ac..0588565 100644 --- a/apps/twisted/src/lib/html.ts +++ b/apps/twisted/src/lib/html.ts @@ -1,9 +1,6 @@ import DOMPurify from "dompurify"; -const SANITIZE_CONFIG = { - USE_PROFILES: { html: true }, - ADD_ATTR: ["class", "style"], -}; +const SANITIZE_CONFIG = { USE_PROFILES: { html: true }, ADD_ATTR: ["class", "style"] }; export function sanitizeRichHtml(html: string): string { return stripHtmlComments(DOMPurify.sanitize(html, SANITIZE_CONFIG)); diff --git a/apps/twisted/src/services/project-api/queries.ts b/apps/twisted/src/services/project-api/queries.ts index 3298044..382850f 100644 --- a/apps/twisted/src/services/project-api/queries.ts +++ b/apps/twisted/src/services/project-api/queries.ts @@ -68,7 +68,10 @@ export type ProjectSearchResults = { function stripHighlight(html?: string): string | undefined { if (!html) return undefined; - const text = html.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim(); + const text = html + .replace(/<[^>]+>/g, " ") + .replace(/\s+/g, " ") + .trim(); return text || undefined; } @@ -157,13 +160,7 @@ export function useProjectSearch( const repos = response.results.filter((result) => result.record_type === "repo").map(toRepoSummary); const profiles = response.results.filter((result) => result.record_type === "profile").map(toUserSummary); - return { - query: response.query, - mode: response.mode, - total: response.total, - repos, - profiles, - }; + return { query: response.query, mode: response.mode, total: response.total, repos, profiles }; }, enabled, staleTime: 2 * MIN, @@ -171,16 +168,11 @@ export function useProjectSearch( }); } -export function useIndexedProfileSummary( - did: MaybeRef, - options: { enabled?: MaybeRef } = {}, -) { +export function useIndexedProfileSummary(did: MaybeRef, options: { enabled?: MaybeRef } = {}) { const normalizedDid = computed(() => toValue(did).trim()); const enabled = computed( () => - hasTwisterApi && - normalizedDid.value.length > 0 && - (options.enabled === undefined || !!toValue(options.enabled)), + hasTwisterApi && normalizedDid.value.length > 0 && (options.enabled === undefined || !!toValue(options.enabled)), ); return useQuery({ diff --git a/apps/twisted/src/views/HomePage.vue b/apps/twisted/src/views/HomePage.vue index 5589a2f..10b526d 100644 --- a/apps/twisted/src/views/HomePage.vue +++ b/apps/twisted/src/views/HomePage.vue @@ -27,35 +27,35 @@ diff --git a/apps/twisted/src/vite-env.d.ts b/apps/twisted/src/vite-env.d.ts index ed63eda..e0b3aa5 100644 --- a/apps/twisted/src/vite-env.d.ts +++ b/apps/twisted/src/vite-env.d.ts @@ -16,11 +16,7 @@ declare module "markdown-it" { use(plugin: (...args: any[]) => unknown, ...params: any[]): MarkdownIt; }; - type MarkdownItOptions = { - html?: boolean; - linkify?: boolean; - typographer?: boolean; - }; + type MarkdownItOptions = { html?: boolean; linkify?: boolean; typographer?: boolean }; const markdownit: (options?: MarkdownItOptions) => MarkdownIt; export default markdownit; -- 2.51.2