Skip to content

Commit 93eb814

Browse files
authored
chore: migrate biome version (#618)
* chore: migrate biome version * chore: fix more lint errors
1 parent 18d6448 commit 93eb814

File tree

119 files changed

+420
-380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+420
-380
lines changed

apps/docs-embed/components-to-string.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ import * as path from "node:path";
33
import { glob } from "glob";
44

55
function escapeComponentContent(content: string): string {
6-
return content
7-
.replace(/\\/g, "\\\\")
8-
.replace(/`/g, "\\`")
9-
.replace(/\$\{/g, "\\${")
10-
.replace(/\"use client\";/g, "")
11-
.trim();
6+
return (
7+
content
8+
.replace(/\\/g, "\\\\")
9+
.replace(/`/g, "\\`")
10+
.replace(/\$\{/g, "\\${")
11+
// biome-ignore lint/complexity/noUselessEscapeInRegex: ignored using `--suppress`
12+
.replace(/\"use client\";/g, "")
13+
.trim()
14+
);
1215
}
1316

1417
function fileNameToExportName(fileName: string): string {

apps/docs-embed/src/app/broadcast/[key]/page.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { notFound } from "next/navigation";
12
import Audio from "@/components/broadcast/audio";
23
import Camera from "@/components/broadcast/camera";
34
import Container from "@/components/broadcast/container";
@@ -20,7 +21,6 @@ import {
2021
CodeWithExampleServer,
2122
getBroadcastKeys,
2223
} from "@/components/code/code-server";
23-
import { notFound } from "next/navigation";
2424

2525
export const dynamic = "force-static";
2626

@@ -32,7 +32,9 @@ export async function generateStaticParams() {
3232

3333
export default ({
3434
params,
35-
}: { params: { key: BroadcastComponentKey | undefined } }) => {
35+
}: {
36+
params: { key: BroadcastComponentKey | undefined };
37+
}) => {
3638
if (!params.key) {
3739
notFound();
3840
}
@@ -76,6 +78,7 @@ export default ({
7678
) : params.key === "video" ? (
7779
<Video />
7880
) : (
81+
// biome-ignore lint/complexity/noUselessFragments: ignored using `--suppress`
7982
<></>
8083
)
8184
}

apps/docs-embed/src/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { cn } from "@/lib/utils";
21
import type { Metadata } from "next";
32
import { Inter } from "next/font/google";
43
import { Toaster } from "sonner";
4+
import { cn } from "@/lib/utils";
55
import "./globals.css";
66

77
const inter = Inter({ subsets: ["latin"] });

apps/docs-embed/src/app/player/[key]/page.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import { notFound } from "next/navigation";
12
import {
23
CodeWithExampleServer,
3-
type PlayerComponentKey,
44
getPlayerKeys,
5+
type PlayerComponentKey,
56
} from "@/components/code/code-server";
67
import Clip from "@/components/player/clip";
78
import Container from "@/components/player/container";
@@ -23,7 +24,6 @@ import UseMediaContext from "@/components/player/use-media-context";
2324
import Video from "@/components/player/video";
2425
import VideoQuality from "@/components/player/video-quality";
2526
import Volume from "@/components/player/volume";
26-
import { notFound } from "next/navigation";
2727

2828
export const dynamic = "force-static";
2929

@@ -35,7 +35,9 @@ export async function generateStaticParams() {
3535

3636
export default ({
3737
params,
38-
}: { params: { key: PlayerComponentKey | undefined } }) => {
38+
}: {
39+
params: { key: PlayerComponentKey | undefined };
40+
}) => {
3941
if (!params.key) {
4042
notFound();
4143
}
@@ -85,6 +87,7 @@ export default ({
8587
) : params.key === "volume" ? (
8688
<Volume />
8789
) : (
90+
// biome-ignore lint/complexity/noUselessFragments: ignored using `--suppress`
8891
<></>
8992
)
9093
}

apps/docs-embed/src/components/broadcast/fullscreen.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
"use client";
22

3-
import * as Broadcast from "@livepeer/react/broadcast";
4-
import { getIngest } from "@livepeer/react/external";
5-
63
import {
74
EnterFullscreenIcon,
85
ExitFullscreenIcon,
96
} from "@livepeer/react/assets";
7+
import * as Broadcast from "@livepeer/react/broadcast";
8+
import { getIngest } from "@livepeer/react/external";
109
import { streamKey } from "./stream-key";
1110

1211
export default () => {

apps/docs-embed/src/components/broadcast/pip.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
"use client";
22

3+
import { PictureInPictureIcon } from "@livepeer/react/assets";
34
import * as Broadcast from "@livepeer/react/broadcast";
45
import { getIngest } from "@livepeer/react/external";
5-
6-
import { PictureInPictureIcon } from "@livepeer/react/assets";
76
import { streamKey } from "./stream-key";
87

98
export default () => {

apps/docs-embed/src/components/code/code-server.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import { notFound } from "next/navigation";
12
import * as broadcastComponents from "@/lib/broadcast-components";
23
import * as playerComponents from "@/lib/player-components";
34
import { codeToHtml } from "@/lib/shiki";
4-
import { notFound } from "next/navigation";
55
import { ExpandableCode } from "./code";
66

77
export type PlayerComponentKey = keyof typeof playerComponents;
@@ -32,8 +32,10 @@ export const CodeWithExampleServer = async ({
3232
}) => {
3333
const stringComponent =
3434
type === "player"
35-
? playerComponents[component as PlayerComponentKey]
36-
: broadcastComponents[component as BroadcastComponentKey];
35+
? // biome-ignore lint/performance/noDynamicNamespaceImportAccess: ignored using `--suppress`
36+
playerComponents[component as PlayerComponentKey]
37+
: // biome-ignore lint/performance/noDynamicNamespaceImportAccess: ignored using `--suppress`
38+
broadcastComponents[component as BroadcastComponentKey];
3739

3840
if (!stringComponent) {
3941
notFound();

apps/docs-embed/src/components/player/fullscreen.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
"use client";
22

3-
import { getSrc } from "@livepeer/react/external";
4-
import * as Player from "@livepeer/react/player";
5-
63
import {
74
EnterFullscreenIcon,
85
ExitFullscreenIcon,
96
} from "@livepeer/react/assets";
7+
import { getSrc } from "@livepeer/react/external";
8+
import * as Player from "@livepeer/react/player";
109
import { vodSource } from "./source";
1110

1211
export default () => {

apps/docs-embed/src/components/player/pip.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
"use client";
22

3+
import { PictureInPictureIcon } from "@livepeer/react/assets";
34
import { getSrc } from "@livepeer/react/external";
45
import * as Player from "@livepeer/react/player";
5-
6-
import { PictureInPictureIcon } from "@livepeer/react/assets";
76
import { vodSource } from "./source";
87

98
export default () => {

apps/docs-embed/src/components/player/play.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
"use client";
22

3+
import { PauseIcon, PlayIcon } from "@livepeer/react/assets";
34
import { getSrc } from "@livepeer/react/external";
45
import * as Player from "@livepeer/react/player";
5-
6-
import { PauseIcon, PlayIcon } from "@livepeer/react/assets";
76
import { vodSource } from "./source";
87

98
export default () => {

0 commit comments

Comments
 (0)