From 251f9edafcf4e5e482f37408e4be117b9da3f338 Mon Sep 17 00:00:00 2001 From: Alaister Young <10985857+alaister@users.noreply.github.com> Date: Wed, 27 May 2026 21:21:32 +0800 Subject: [PATCH] chore(studio): silence ratchet on TanStack-only files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `routes/__root.tsx` and `compat/next/*` exist only on the TanStack side so they're net-new vs master's ratchet baseline. Type the Sentry event-id attachment in the global error boundary (no more `as any`) and mark each compat shim's `export default` with `no-restricted-exports` disable directives — the defaults match Next's module shape, which is the whole point of the shim. Also declare STUDIO_FRAMEWORK in apps/studio/turbo.jsonc so the turbo env lint stops failing on `api/server.js` / `vercel.ts` / `scripts/dispatch.js`. --- apps/studio/compat/next/dynamic.tsx | 1 + apps/studio/compat/next/head.tsx | 1 + apps/studio/compat/next/image.tsx | 1 + apps/studio/compat/next/legacy/image.tsx | 1 + apps/studio/compat/next/link.tsx | 1 + apps/studio/compat/next/router.ts | 1 + apps/studio/compat/next/script.tsx | 1 + apps/studio/routes/__root.tsx | 4 ++-- apps/studio/turbo.jsonc | 3 +++ 9 files changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/studio/compat/next/dynamic.tsx b/apps/studio/compat/next/dynamic.tsx index 47134022b9b..9b026b10c7a 100644 --- a/apps/studio/compat/next/dynamic.tsx +++ b/apps/studio/compat/next/dynamic.tsx @@ -25,6 +25,7 @@ function isDefaultExport
( } +// eslint-disable-next-line no-restricted-exports export default function dynamic
( loader: Loader
,
options: DynamicOptions = {}
diff --git a/apps/studio/compat/next/head.tsx b/apps/studio/compat/next/head.tsx
index 4724a4511df..b5e79e6e73a 100644
--- a/apps/studio/compat/next/head.tsx
+++ b/apps/studio/compat/next/head.tsx
@@ -25,6 +25,7 @@ import type { ReactNode } from 'react'
// We have no such consumers today; if one shows up, swap to a
// portal+SSR-collector setup.
+// eslint-disable-next-line no-restricted-exports
export default function Head({ children }: { children?: ReactNode }) {
return <>{children}>
}
diff --git a/apps/studio/compat/next/image.tsx b/apps/studio/compat/next/image.tsx
index 2736c35a099..1f27dbc4744 100644
--- a/apps/studio/compat/next/image.tsx
+++ b/apps/studio/compat/next/image.tsx
@@ -144,4 +144,5 @@ const Image = forwardRef(function Image(
)
})
+// eslint-disable-next-line no-restricted-exports
export default Image
diff --git a/apps/studio/compat/next/legacy/image.tsx b/apps/studio/compat/next/legacy/image.tsx
index faa579427f6..df270630aa1 100644
--- a/apps/studio/compat/next/legacy/image.tsx
+++ b/apps/studio/compat/next/legacy/image.tsx
@@ -140,4 +140,5 @@ const Image = forwardRef(function Image(
)
})
+// eslint-disable-next-line no-restricted-exports
export default Image
diff --git a/apps/studio/compat/next/link.tsx b/apps/studio/compat/next/link.tsx
index 0f1e8e7e5af..c481bad49c9 100644
--- a/apps/studio/compat/next/link.tsx
+++ b/apps/studio/compat/next/link.tsx
@@ -246,4 +246,5 @@ const Link = forwardRef(function Link(
)
})
+// eslint-disable-next-line no-restricted-exports
export default Link
diff --git a/apps/studio/compat/next/router.ts b/apps/studio/compat/next/router.ts
index 07b38781cf9..1608660bc43 100644
--- a/apps/studio/compat/next/router.ts
+++ b/apps/studio/compat/next/router.ts
@@ -261,4 +261,5 @@ const singletonRouter = {
},
}
+// eslint-disable-next-line no-restricted-exports
export default singletonRouter
diff --git a/apps/studio/compat/next/script.tsx b/apps/studio/compat/next/script.tsx
index bab5cb96f16..cd844cd0547 100644
--- a/apps/studio/compat/next/script.tsx
+++ b/apps/studio/compat/next/script.tsx
@@ -20,6 +20,7 @@ interface ScriptProps extends Omit