From 09eb91f2ab04a48be8f0bda4a50e5923774d0ad8 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 20:49:34 +0000 Subject: [PATCH] =?UTF-8?q?chore(prettier):=20=F0=9F=A4=96=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/tsconfig.json | 6 +-- .../src/app/(blog)/AuthorAvatar.tsx | 41 ++++++++++--------- .../src/app/(blog)/MoreStories.tsx | 6 ++- .../VisualEditing/PostMessageQueries.tsx | 20 ++++----- .../src/components/VisualEditing/actions.ts | 2 +- apps/next-server-only/tsconfig.json | 10 ++--- apps/next/tsconfig.json | 12 +++--- apps/nuxt/server/tsconfig.json | 2 +- apps/nuxt/tsconfig.json | 4 +- apps/page-builder-demo/tsconfig.json | 12 +++--- apps/remix/tsconfig.json | 12 +++--- apps/studio/tsconfig.json | 6 +-- apps/svelte/tsconfig.json | 4 +- package.json | 2 +- packages/channels/tsconfig.json | 4 +- packages/core-loader/tsconfig.json | 4 +- packages/nuxt-loader/tsconfig.json | 8 ++-- packages/overlays/tsconfig.json | 4 +- packages/presentation/tsconfig.json | 8 ++-- packages/preview-kit-compat/tsconfig.json | 4 +- packages/preview-url-secret/tsconfig.json | 4 +- packages/react-loader/tsconfig.json | 8 ++-- packages/svelte-loader/tsconfig.json | 4 +- packages/visual-editing-helpers/tsconfig.json | 4 +- 24 files changed, 98 insertions(+), 93 deletions(-) diff --git a/apps/common/tsconfig.json b/apps/common/tsconfig.json index 981fc7677..ca8364054 100644 --- a/apps/common/tsconfig.json +++ b/apps/common/tsconfig.json @@ -27,9 +27,9 @@ "noFallthroughCasesInSwitch": true, "paths": { "@sanity/overlays": ["../../packages/overlays/src"], - "@sanity/react-loader": ["../../packages/react-loader/src"] - } + "@sanity/react-loader": ["../../packages/react-loader/src"], + }, }, "include": ["**/*.ts", "**/*.tsx"], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "node_modules"], } diff --git a/apps/next-server-only/src/app/(blog)/AuthorAvatar.tsx b/apps/next-server-only/src/app/(blog)/AuthorAvatar.tsx index bf069606e..253e0db66 100644 --- a/apps/next-server-only/src/app/(blog)/AuthorAvatar.tsx +++ b/apps/next-server-only/src/app/(blog)/AuthorAvatar.tsx @@ -7,33 +7,34 @@ import Balancer from 'react-wrap-balancer' const query = /* groq */ `*[_type == "author" && _id == $id][0]` export async function AuthorAvatar(params: { id: string }) { - const [data,RevalidatePreviewQuery] = await loadQuery({ + const [data, RevalidatePreviewQuery] = await loadQuery({ query, params, tags: [`author:${params.id}`], }) const { name = 'Anonymous', image } = data return ( - <>
-
- {image?.alt + <> +
+
+ {image?.alt +
+
+ {name} +
-
- {name} -
-
- {/* When Draft Mode is enabled this component lets the Sanity Presentation Tool revalidate queries as content changes */} - + {/* When Draft Mode is enabled this component lets the Sanity Presentation Tool revalidate queries as content changes */} + ) } diff --git a/apps/next-server-only/src/app/(blog)/MoreStories.tsx b/apps/next-server-only/src/app/(blog)/MoreStories.tsx index 2f17301c2..4496c8f9d 100644 --- a/apps/next-server-only/src/app/(blog)/MoreStories.tsx +++ b/apps/next-server-only/src/app/(blog)/MoreStories.tsx @@ -15,7 +15,11 @@ export default async function MoreStories(params: { skip: string limit: number }) { - const [data,RevalidatePreviewQuery] = await loadQuery({ query, params, tags: ['post'] }) + const [data, RevalidatePreviewQuery] = await loadQuery({ + query, + params, + tags: ['post'], + }) return ( <> diff --git a/apps/next-server-only/src/components/VisualEditing/PostMessageQueries.tsx b/apps/next-server-only/src/components/VisualEditing/PostMessageQueries.tsx index e3b6c3cbb..142fd69b9 100644 --- a/apps/next-server-only/src/components/VisualEditing/PostMessageQueries.tsx +++ b/apps/next-server-only/src/components/VisualEditing/PostMessageQueries.tsx @@ -119,17 +119,17 @@ export function RevalidateQuery(props: RevalidateQueryProps) { snapshot.perspective === perspective && snapshotRef.current.data && !isEqual(snapshotRef.current.data, snapshot.data) - ) { - clearTimeout(revalidateRef.current) - revalidate({tags}) - revalidateRef.current = window.setTimeout(() => { - revalidate({tags}) - }, 1000) - } - snapshotRef.current = snapshot - }, [perspective, snapshot, tags]) + ) { + clearTimeout(revalidateRef.current) + revalidate({ tags }) + revalidateRef.current = window.setTimeout(() => { + revalidate({ tags }) + }, 1000) + } + snapshotRef.current = snapshot + }, [perspective, snapshot, tags]) - /* + /* const [shouldRevalidate, setShouldRevalidate] = useState(false) const revalidating = useRef(false) useEffect(() => { diff --git a/apps/next-server-only/src/components/VisualEditing/actions.ts b/apps/next-server-only/src/components/VisualEditing/actions.ts index 12c4a3520..6c486ea71 100644 --- a/apps/next-server-only/src/components/VisualEditing/actions.ts +++ b/apps/next-server-only/src/components/VisualEditing/actions.ts @@ -4,7 +4,7 @@ import { revalidateTag } from 'next/cache' import { draftMode } from 'next/headers' export async function revalidate({ tags }: { tags: string[] }) { - if(draftMode().isEnabled) { + if (draftMode().isEnabled) { for (const tag of tags) { await revalidateTag(tag) } diff --git a/apps/next-server-only/tsconfig.json b/apps/next-server-only/tsconfig.json index 825d679c2..a13218ca1 100644 --- a/apps/next-server-only/tsconfig.json +++ b/apps/next-server-only/tsconfig.json @@ -15,13 +15,13 @@ "incremental": true, "plugins": [ { - "name": "next" - } + "name": "next", + }, ], "paths": { - "@/*": ["./src/*"] - } + "@/*": ["./src/*"], + }, }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "exclude": ["node_modules"], } diff --git a/apps/next/tsconfig.json b/apps/next/tsconfig.json index 0e808aa71..989612337 100644 --- a/apps/next/tsconfig.json +++ b/apps/next/tsconfig.json @@ -15,15 +15,15 @@ "incremental": true, "plugins": [ { - "name": "next" - } + "name": "next", + }, ], "rootDir": "../..", "paths": { "@/*": ["./src/*"], "@sanity/overlays": ["../../packages/overlays/src"], - "@sanity/preview-kit-compat": ["../../packages/preview-kit-compat/src"] - } + "@sanity/preview-kit-compat": ["../../packages/preview-kit-compat/src"], + }, }, "include": [ "../../packages/overlays/src", @@ -31,7 +31,7 @@ "next-env.d.ts", "**/*.ts", "**/*.tsx", - ".next/types/**/*.ts" + ".next/types/**/*.ts", ], - "exclude": ["node_modules"] + "exclude": ["node_modules"], } diff --git a/apps/nuxt/server/tsconfig.json b/apps/nuxt/server/tsconfig.json index b9ed69c19..423dc7742 100644 --- a/apps/nuxt/server/tsconfig.json +++ b/apps/nuxt/server/tsconfig.json @@ -1,3 +1,3 @@ { - "extends": "../.nuxt/tsconfig.server.json" + "extends": "../.nuxt/tsconfig.server.json", } diff --git a/apps/nuxt/tsconfig.json b/apps/nuxt/tsconfig.json index 8dd4cf3b7..c69546d2e 100644 --- a/apps/nuxt/tsconfig.json +++ b/apps/nuxt/tsconfig.json @@ -2,6 +2,6 @@ // https://nuxt.com/docs/guide/concepts/typescript "extends": "./.nuxt/tsconfig.json", "compilerOptions": { - "moduleResolution": "bundler" - } + "moduleResolution": "bundler", + }, } diff --git a/apps/page-builder-demo/tsconfig.json b/apps/page-builder-demo/tsconfig.json index 93f6ec9ad..ef7bf87ec 100644 --- a/apps/page-builder-demo/tsconfig.json +++ b/apps/page-builder-demo/tsconfig.json @@ -15,15 +15,15 @@ "incremental": true, "plugins": [ { - "name": "next" - } + "name": "next", + }, ], "rootDir": "../..", "paths": { "@/*": ["./src/*"], "@sanity/overlays": ["../../packages/overlays/src"], - "@sanity/react-loader": ["../../packages/react-loader/src"] - } + "@sanity/react-loader": ["../../packages/react-loader/src"], + }, }, "include": [ "../../packages/csm/src", @@ -32,7 +32,7 @@ "next-env.d.ts", "**/*.ts", "**/*.tsx", - ".next/types/**/*.ts" + ".next/types/**/*.ts", ], - "exclude": ["node_modules"] + "exclude": ["node_modules"], } diff --git a/apps/remix/tsconfig.json b/apps/remix/tsconfig.json index 7d76fcbab..b69a1678c 100644 --- a/apps/remix/tsconfig.json +++ b/apps/remix/tsconfig.json @@ -7,7 +7,7 @@ "**/*.tsx", "../../packages/csm/src", "../../packages/core-loader/src", - "../../packages/react-loader/src" + "../../packages/react-loader/src", ], "compilerOptions": { "skipLibCheck": true, @@ -31,14 +31,14 @@ "@sanity/react-loader": ["../../packages/react-loader/src"], "@sanity/react-loader/jsx": ["../../packages/react-loader/src/jsx"], "@sanity/visual-editing-helpers": [ - "../../packages/visual-editing-helpers/src" + "../../packages/visual-editing-helpers/src", ], "@sanity/visual-editing-helpers/csm": [ - "../../packages/visual-editing-helpers/src/csm" - ] + "../../packages/visual-editing-helpers/src/csm", + ], }, // Remix takes care of building everything in `remix build`. - "noEmit": true - } + "noEmit": true, + }, } diff --git a/apps/studio/tsconfig.json b/apps/studio/tsconfig.json index 5141ad333..cb3d3bdac 100644 --- a/apps/studio/tsconfig.json +++ b/apps/studio/tsconfig.json @@ -17,9 +17,9 @@ "incremental": true, "paths": { "@sanity/presentation": ["../../packages/presentation/src"], - "@sanity/preview-url-secret": ["../../packages/preview-url-secret/src"] - } + "@sanity/preview-url-secret": ["../../packages/preview-url-secret/src"], + }, }, "include": ["**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"] + "exclude": ["node_modules"], } diff --git a/apps/svelte/tsconfig.json b/apps/svelte/tsconfig.json index 34aadc028..9d20aa08e 100644 --- a/apps/svelte/tsconfig.json +++ b/apps/svelte/tsconfig.json @@ -9,8 +9,8 @@ "skipLibCheck": true, "sourceMap": true, "strict": true, - "moduleResolution": "bundler" - } + "moduleResolution": "bundler", + }, // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias // // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes diff --git a/package.json b/package.json index f00a5f739..77a411f49 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "format": "prettier --cache --write .", "lint": "turbo run lint", "lint:fix": "pnpm lint -- --fix", - "page-builder-demo:dev": "turbo run dev --filter=./apps/page-builder-demo --filter=./apps/studio", "next-server-only:dev": "turbo run dev --filter=./apps/next-server-only", + "page-builder-demo:dev": "turbo run dev --filter=./apps/page-builder-demo --filter=./apps/studio", "preview": "turbo run preview", "test": "turbo run test", "watch": "turbo run watch" diff --git a/packages/channels/tsconfig.json b/packages/channels/tsconfig.json index c20d4e7f4..2123c4f28 100644 --- a/packages/channels/tsconfig.json +++ b/packages/channels/tsconfig.json @@ -27,8 +27,8 @@ "noUnusedLocals": false, "noUnusedParameters": false, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, }, "include": ["**/*.ts", "**/*.tsx"], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "node_modules"], } diff --git a/packages/core-loader/tsconfig.json b/packages/core-loader/tsconfig.json index 9027f9557..b2777e0cb 100644 --- a/packages/core-loader/tsconfig.json +++ b/packages/core-loader/tsconfig.json @@ -3,8 +3,8 @@ "compilerOptions": { "incremental": true, "noEmit": true, - "strictNullChecks": true + "strictNullChecks": true, }, "include": ["**/*.ts", "**/*.tsx"], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "node_modules"], } diff --git a/packages/nuxt-loader/tsconfig.json b/packages/nuxt-loader/tsconfig.json index d109f0654..22781e69f 100644 --- a/packages/nuxt-loader/tsconfig.json +++ b/packages/nuxt-loader/tsconfig.json @@ -7,14 +7,14 @@ "paths": { "@sanity/core-loader": ["../core-loader/src"], "@sanity/visual-editing-helpers": ["../visual-editing-helpers/src"], - "@sanity/visual-editing-helpers/*": ["../visual-editing-helpers/src/*"] - } + "@sanity/visual-editing-helpers/*": ["../visual-editing-helpers/src/*"], + }, }, "include": [ "**/*.ts", "**/*.tsx", "../core-loader/src", - "../visual-editing-helpers/src" + "../visual-editing-helpers/src", ], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "node_modules"], } diff --git a/packages/overlays/tsconfig.json b/packages/overlays/tsconfig.json index 9027f9557..b2777e0cb 100644 --- a/packages/overlays/tsconfig.json +++ b/packages/overlays/tsconfig.json @@ -3,8 +3,8 @@ "compilerOptions": { "incremental": true, "noEmit": true, - "strictNullChecks": true + "strictNullChecks": true, }, "include": ["**/*.ts", "**/*.tsx"], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "node_modules"], } diff --git a/packages/presentation/tsconfig.json b/packages/presentation/tsconfig.json index 3ee95ddf9..de5645233 100644 --- a/packages/presentation/tsconfig.json +++ b/packages/presentation/tsconfig.json @@ -7,8 +7,8 @@ "paths": { "@sanity/preview-url-secret": ["../preview-url-secret/src"], "@sanity/channels": ["../channels/src"], - "@sanity/visual-editing-helpers": ["../visual-editing-helpers/src"] - } + "@sanity/visual-editing-helpers": ["../visual-editing-helpers/src"], + }, }, "include": [ "**/*.ts", @@ -16,7 +16,7 @@ "../channels/src", "../preview-url-secret/src", "../preview-url-secret/legacy", - "../visual-editing-helpers/src" + "../visual-editing-helpers/src", ], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "node_modules"], } diff --git a/packages/preview-kit-compat/tsconfig.json b/packages/preview-kit-compat/tsconfig.json index 9027f9557..b2777e0cb 100644 --- a/packages/preview-kit-compat/tsconfig.json +++ b/packages/preview-kit-compat/tsconfig.json @@ -3,8 +3,8 @@ "compilerOptions": { "incremental": true, "noEmit": true, - "strictNullChecks": true + "strictNullChecks": true, }, "include": ["**/*.ts", "**/*.tsx"], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "node_modules"], } diff --git a/packages/preview-url-secret/tsconfig.json b/packages/preview-url-secret/tsconfig.json index 9027f9557..b2777e0cb 100644 --- a/packages/preview-url-secret/tsconfig.json +++ b/packages/preview-url-secret/tsconfig.json @@ -3,8 +3,8 @@ "compilerOptions": { "incremental": true, "noEmit": true, - "strictNullChecks": true + "strictNullChecks": true, }, "include": ["**/*.ts", "**/*.tsx"], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "node_modules"], } diff --git a/packages/react-loader/tsconfig.json b/packages/react-loader/tsconfig.json index d109f0654..22781e69f 100644 --- a/packages/react-loader/tsconfig.json +++ b/packages/react-loader/tsconfig.json @@ -7,14 +7,14 @@ "paths": { "@sanity/core-loader": ["../core-loader/src"], "@sanity/visual-editing-helpers": ["../visual-editing-helpers/src"], - "@sanity/visual-editing-helpers/*": ["../visual-editing-helpers/src/*"] - } + "@sanity/visual-editing-helpers/*": ["../visual-editing-helpers/src/*"], + }, }, "include": [ "**/*.ts", "**/*.tsx", "../core-loader/src", - "../visual-editing-helpers/src" + "../visual-editing-helpers/src", ], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "node_modules"], } diff --git a/packages/svelte-loader/tsconfig.json b/packages/svelte-loader/tsconfig.json index 9027f9557..b2777e0cb 100644 --- a/packages/svelte-loader/tsconfig.json +++ b/packages/svelte-loader/tsconfig.json @@ -3,8 +3,8 @@ "compilerOptions": { "incremental": true, "noEmit": true, - "strictNullChecks": true + "strictNullChecks": true, }, "include": ["**/*.ts", "**/*.tsx"], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "node_modules"], } diff --git a/packages/visual-editing-helpers/tsconfig.json b/packages/visual-editing-helpers/tsconfig.json index 9027f9557..b2777e0cb 100644 --- a/packages/visual-editing-helpers/tsconfig.json +++ b/packages/visual-editing-helpers/tsconfig.json @@ -3,8 +3,8 @@ "compilerOptions": { "incremental": true, "noEmit": true, - "strictNullChecks": true + "strictNullChecks": true, }, "include": ["**/*.ts", "**/*.tsx"], - "exclude": ["dist", "node_modules"] + "exclude": ["dist", "node_modules"], }