Skip to content

Commit 7a8b14b

Browse files
committed
trailing commas. can of worms :(
1 parent 2de7665 commit 7a8b14b

39 files changed

+111
-111
lines changed

apps/web/src/app/api/stream/sandbox/[sandboxId]/route.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const supabase = createClient(supabaseUrl, supabaseServiceKey)
99

1010
export async function GET(
1111
request: Request,
12-
{ params }: { params: { sandboxId: string } }
12+
{ params }: { params: { sandboxId: string } },
1313
) {
1414
const apiKey = request.headers.get('X-API-Key')
1515
const sandboxId = params.sandboxId
@@ -35,14 +35,14 @@ export async function GET(
3535
if (error) {
3636
return NextResponse.json(
3737
{ error: `Failed to retrieve stream - ${error.message}` },
38-
{ status: 500 }
38+
{ status: 500 },
3939
)
4040
}
4141

4242
if (!stream) {
4343
return NextResponse.json(
4444
{ error: `Stream not found for sandbox ${sandboxId}` },
45-
{ status: 404 }
45+
{ status: 404 },
4646
)
4747
}
4848

apps/web/src/app/api/stream/sandbox/route.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export async function POST(request: Request) {
4242
{
4343
error: `Failed to check existing stream - ${existingStreamError.message}`,
4444
},
45-
{ status: 500 }
45+
{ status: 500 },
4646
)
4747
}
4848

@@ -51,7 +51,7 @@ export async function POST(request: Request) {
5151
{
5252
error: `Stream for the sandbox '${sandboxId}' already exists. There can be only one stream per sandbox.`,
5353
},
54-
{ status: 400 }
54+
{ status: 400 },
5555
)
5656
}
5757

@@ -66,7 +66,7 @@ export async function POST(request: Request) {
6666
if (!liveStream.playback_ids?.[0]?.id) {
6767
return NextResponse.json(
6868
{ error: 'Failed to create live stream' },
69-
{ status: 500 }
69+
{ status: 500 },
7070
)
7171
}
7272

@@ -82,19 +82,19 @@ export async function POST(request: Request) {
8282
if (error) {
8383
return NextResponse.json(
8484
{ error: `Failed to insert and retrieve token - ${error.message}` },
85-
{ status: 500 }
85+
{ status: 500 },
8686
)
8787
}
8888

8989
if (!data) {
9090
return NextResponse.json(
9191
{ error: 'Failed to insert and retrieve token - no data' },
92-
{ status: 500 }
92+
{ status: 500 },
9393
)
9494
}
9595

9696
return NextResponse.json(
9797
{ streamKey: liveStream.stream_key, token: data.token },
98-
{ status: 201 }
98+
{ status: 201 },
9999
)
100100
}

apps/web/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ export default async function RootLayout({ children }) {
9393
pages.map(async (filename) => [
9494
'/docs/' + filename.replace(/\(docs\)\/?|(^|\/)page\.mdx$/, ''),
9595
(await import(`./(docs)/docs/${filename}`)).sections,
96-
])
96+
]),
9797
)) as Array<[string, Array<Section>]>
9898
const allSections = Object.fromEntries(allSectionsEntries)
9999

apps/web/src/code/js/basics/metadata.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Sandbox } from 'e2b'
22

33
const sandbox = await Sandbox.create({
44
template: 'base',
5-
metadata: { userID: 'uniqueID' } // $HighlightLine
5+
metadata: { userID: 'uniqueID' }, // $HighlightLine
66
})
77
// Keep the sandbox alive for 60 seconds
88
await sandbox.keepAlive(60_000)

apps/web/src/components/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function Button({
5757
'inline-flex gap-0.5 justify-center overflow-hidden text-base font-medium transition',
5858
variantStyles[variant],
5959
disabled && 'opacity-50 pointer-events-none',
60-
className
60+
className,
6161
)
6262

6363
const arrowIcon = (
@@ -66,7 +66,7 @@ export function Button({
6666
'mt-0.5 h-5 w-5',
6767
variant === 'text' && 'relative top-px',
6868
arrow === 'left' && '-ml-1 rotate-180',
69-
arrow === 'right' && '-mr-1'
69+
arrow === 'right' && '-mr-1',
7070
)}
7171
/>
7272
)

apps/web/src/components/Code.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ function CodePanel({
6868

6969
if (!code) {
7070
throw new Error(
71-
'`CodePanel` requires a `code` prop, or a child with a `code` prop.'
71+
'`CodePanel` requires a `code` prop, or a child with a `code` prop.',
7272
)
7373
}
7474

7575
// Remove shiki highlight comments for copying
7676
const cleanCode = code.replace(
7777
/ +\/\/ \$HighlightLine$|\s*# \$HighlightLine$/gm,
78-
''
78+
'',
7979
)
8080

8181
return (
@@ -122,7 +122,7 @@ export function CodeGroupHeader({
122122
'border-b py-3 transition ui-not-focus-visible:outline-none',
123123
childIndex === selectedIndex
124124
? 'border-brand-500 text-brand-400'
125-
: 'border-transparent text-zinc-400 hover:text-zinc-300'
125+
: 'border-transparent text-zinc-400 hover:text-zinc-300',
126126
)}
127127
>
128128
<div
@@ -136,7 +136,7 @@ export function CodeGroupHeader({
136136
{renderLanguageLogo(isValidElement(child) ? child.props : {})}
137137
{
138138
extractPanelProps(
139-
isValidElement(child) ? child.props : ({} as any)
139+
isValidElement(child) ? child.props : ({} as any),
140140
).language
141141
}
142142
</div>
@@ -158,15 +158,15 @@ export function CodeGroupHeader({
158158
{selectedIndex === childIndex && (
159159
<>
160160
{extractPanelProps(
161-
isValidElement(child) ? child.props : ({} as any)
161+
isValidElement(child) ? child.props : ({} as any),
162162
).description && (
163163
<span
164164
id={`description-${childIndex}`}
165165
className="text-xs font-medium text-white font-mono p-2"
166166
>
167167
{
168168
extractPanelProps(
169-
isValidElement(child) ? child.props : ({} as any)
169+
isValidElement(child) ? child.props : ({} as any),
170170
).description
171171
}
172172
</span>
@@ -270,7 +270,7 @@ const usePreferredLanguageStore = create<{
270270
set((state) => ({
271271
preferredLanguages: [
272272
...state.preferredLanguages.filter(
273-
(preferredLanguage) => preferredLanguage !== language
273+
(preferredLanguage) => preferredLanguage !== language,
274274
),
275275
language,
276276
],
@@ -282,7 +282,7 @@ export function useTabGroupProps(availableLanguages: Array<string>) {
282282
usePreferredLanguageStore()
283283
const [selectedIndex, setSelectedIndex] = useState(0)
284284
const activeLanguage = [...availableLanguages].sort(
285-
(a, z) => preferredLanguages.indexOf(z) - preferredLanguages.indexOf(a)
285+
(a, z) => preferredLanguages.indexOf(z) - preferredLanguages.indexOf(a),
286286
)[0]
287287

288288
const languageIndex = availableLanguages.indexOf(activeLanguage)
@@ -297,7 +297,7 @@ export function useTabGroupProps(availableLanguages: Array<string>) {
297297
selectedIndex,
298298
onChange: (newSelectedIndex: number) => {
299299
preventLayoutShift(() =>
300-
addPreferredLanguage(availableLanguages[newSelectedIndex])
300+
addPreferredLanguage(availableLanguages[newSelectedIndex]),
301301
)
302302
},
303303
}
@@ -324,7 +324,7 @@ export function CodeGroup({
324324
'not-prose my-6 overflow-hidden rounded-2xl bg-zinc-900 shadow-md dark:ring-1 dark:ring-white/10'
325325
const languages =
326326
Children.map(children, (child) =>
327-
getPanelTitle(isValidElement(child) ? child.props : {})
327+
getPanelTitle(isValidElement(child) ? child.props : {}),
328328
) ?? []
329329
const tabGroupProps = useTabGroupProps(languages)
330330

@@ -376,7 +376,7 @@ export function Code({
376376
if (isGrouped) {
377377
if (typeof children !== 'string') {
378378
throw new Error(
379-
'`Code` children must be a string when nested inside a `CodeGroup`.'
379+
'`Code` children must be a string when nested inside a `CodeGroup`.',
380380
)
381381
}
382382
return <code {...props} dangerouslySetInnerHTML={{ __html: children }} />
@@ -404,7 +404,7 @@ export function Pre({
404404
export function CodeGroupAutoload({ children, isRunnable = false }) {
405405
if (!children) {
406406
console.warn(
407-
'CodeGroupAutoload: No children provided - something is wrong with your MDX file'
407+
'CodeGroupAutoload: No children provided - something is wrong with your MDX file',
408408
)
409409
return null
410410
}

apps/web/src/components/CopyButton.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function CopyButton({
4949
'group/button absolute overflow-hidden rounded-full border border-zinc-700 py-1 pl-2 pr-3 text-2xs font-medium opacity-0 transition focus:opacity-100 group-hover:opacity-100',
5050
copied
5151
? 'bg-brand-400/20 ring-1 ring-inset ring-brand-400/20'
52-
: 'dark:hover:bg-red-500/ bg-white/5 hover:bg-white/7.5 dark:bg-white/2.5'
52+
: 'dark:hover:bg-red-500/ bg-white/5 hover:bg-white/7.5 dark:bg-white/2.5',
5353
)}
5454
onClick={() => {
5555
window.navigator.clipboard.writeText(code).then(() => {
@@ -62,7 +62,7 @@ export function CopyButton({
6262
aria-hidden={copied}
6363
className={clsx(
6464
'pointer-events-none flex items-center justify-center gap-0.5 text-zinc-400 transition duration-300',
65-
copied && '-translate-y-1.5 opacity-0'
65+
copied && '-translate-y-1.5 opacity-0',
6666
)}
6767
>
6868
<ClipboardIcon className="h-5 w-5 fill-zinc-500/20 stroke-zinc-500 transition-colors group-hover/button:stroke-zinc-400" />
@@ -72,7 +72,7 @@ export function CopyButton({
7272
aria-hidden={!copied}
7373
className={clsx(
7474
'pointer-events-none absolute inset-0 flex items-center justify-center text-brand-400 transition duration-300',
75-
!copied && 'translate-y-1.5 opacity-0'
75+
!copied && 'translate-y-1.5 opacity-0',
7676
)}
7777
>
7878
Copied!

apps/web/src/components/DocsBox.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function Icon({
2424
'flex h-8 w-8 items-center justify-center rounded-full backdrop-blur-[2px] transition duration-300 ',
2525
noBackground
2626
? 'bg-none ring-0'
27-
: 'ring-1 ring-white/15 bg-white/7.5 group-hover:bg-brand-300/10 group-hover:ring-brand-400'
27+
: 'ring-1 ring-white/15 bg-white/7.5 group-hover:bg-brand-300/10 group-hover:ring-brand-400',
2828
)}
2929
>
3030
{icon}
@@ -56,15 +56,15 @@ export function DocsBox({
5656
'group relative flex rounded-2xl transition-shadow hover:shadow-md',
5757
noBackground
5858
? 'bg-none hover:bg-none'
59-
: 'bg-white/2.5 hover:shadow-black/5'
59+
: 'bg-white/2.5 hover:shadow-black/5',
6060
)}
6161
>
6262
<div
6363
className={clsx(
6464
'absolute inset-0 rounded-2xl',
6565
noBackground
6666
? 'ring-0 outline-none'
67-
: 'ring-1 ring-inset ring-white/10 group-hover:ring-white/20'
67+
: 'ring-1 ring-inset ring-white/10 group-hover:ring-white/20',
6868
)}
6969
/>
7070
{noBackground ? (

apps/web/src/components/Header.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function DocumentationTypeLink({
3434
'hover:text-white hover:cursor-pointer text-sm font-medium px-2 py-1 rounded-md',
3535
pathname.startsWith(href)
3636
? 'text-white bg-zinc-800'
37-
: 'text-neutral-400'
37+
: 'text-neutral-400',
3838
)}
3939
href={href}
4040
>
@@ -75,7 +75,7 @@ export const Header = forwardRef(function Header({ className }, ref) {
7575
className={clsx(
7676
className,
7777
'fixed inset-x-0 top-0 z-50 flex h-14 items-center justify-between gap-12 px-4 transition sm:px-6 lg:z-30 lg:px-6',
78-
!isInsideMobileNavigation && 'backdrop-blur-sm dark:backdrop-blur'
78+
!isInsideMobileNavigation && 'backdrop-blur-sm dark:backdrop-blur',
7979
)}
8080
style={
8181
{
@@ -88,7 +88,7 @@ export const Header = forwardRef(function Header({ className }, ref) {
8888
className={clsx(
8989
'absolute inset-x-0 top-full h-px transition',
9090
(isInsideMobileNavigation || !mobileNavIsOpen) &&
91-
'bg-zinc-900/7.5 dark:bg-white/7.5'
91+
'bg-zinc-900/7.5 dark:bg-white/7.5',
9292
)}
9393
/>
9494
{/* Desktop logo */}

apps/web/src/components/LanguageSpecificText.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function LanguageSpecificText({
2222
}: Props) {
2323
const languages =
2424
Children.map(children, (child) =>
25-
getPanelTitle(isValidElement(child) ? child.props : ({} as any))
25+
getPanelTitle(isValidElement(child) ? child.props : ({} as any)),
2626
) ?? []
2727
const tabGroupProps = useTabGroupProps(languages)
2828

0 commit comments

Comments
 (0)