@@ -387,9 +389,11 @@ export const PlayerLoading = ({
);
+// biome-ignore lint/correctness/noUnusedVariables: ignored using `--suppress`
function isInIframe() {
try {
return typeof window !== "undefined" && window.self !== window.top;
+ // biome-ignore lint/correctness/noUnusedVariables: ignored using `--suppress`
} catch (e) {
// if accessing window.top throws an exception due to cross-origin policy,
// the catch block will also return true,
diff --git a/apps/lvpr-tv/src/components/player/Settings.tsx b/apps/lvpr-tv/src/components/player/Settings.tsx
index f09a32a9..687adc06 100644
--- a/apps/lvpr-tv/src/components/player/Settings.tsx
+++ b/apps/lvpr-tv/src/components/player/Settings.tsx
@@ -1,12 +1,11 @@
"use client";
+import { SettingsIcon } from "@livepeer/react/assets";
import * as Player from "@livepeer/react/player";
import * as Popover from "@radix-ui/react-popover";
-
-import { cn } from "@/lib/utils";
-import { SettingsIcon } from "@livepeer/react/assets";
import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
import React from "react";
+import { cn } from "@/lib/utils";
export const Settings = React.forwardRef(
(
diff --git a/apps/lvpr-tv/src/components/player/actions.ts b/apps/lvpr-tv/src/components/player/actions.ts
index 29332b8d..c51bdef5 100644
--- a/apps/lvpr-tv/src/components/player/actions.ts
+++ b/apps/lvpr-tv/src/components/player/actions.ts
@@ -1,7 +1,7 @@
"use server";
-import { livepeer } from "@/lib/livepeer";
import type { ClipPayload } from "livepeer/models/components";
+import { livepeer } from "@/lib/livepeer";
export const createClip = async (opts: ClipPayload) => {
try {
diff --git a/biome.json b/biome.json
index 3930ce6f..e9c38299 100644
--- a/biome.json
+++ b/biome.json
@@ -1,14 +1,62 @@
{
- "$schema": "https://biomejs.dev/schemas/1.5.2/schema.json",
- "organizeImports": {
- "enabled": true
- },
+ "$schema": "https://biomejs.dev/schemas/2.0.5/schema.json",
+ "assist": { "actions": { "source": { "organizeImports": "on" } } },
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"suspicious": {
"noExplicitAny": "warn"
+ },
+ "style": {
+ "noParameterAssign": "error",
+ "useAsConstAssertion": "error",
+ "useDefaultParameterLast": "error",
+ "useEnumInitializers": "error",
+ "useSelfClosingElements": "error",
+ "useSingleVarDeclarator": "error",
+ "noUnusedTemplateLiteral": "error",
+ "useNumberNamespace": "error",
+ "noInferrableTypes": "error",
+ "noUselessElse": "error"
+ },
+ "a11y": {
+ "noAccessKey": "off",
+ "noAriaHiddenOnFocusable": "off",
+ "noAriaUnsupportedElements": "off",
+ "noAutofocus": "off",
+ "noDistractingElements": "off",
+ "noHeaderScope": "off",
+ "noInteractiveElementToNoninteractiveRole": "off",
+ "noLabelWithoutControl": "off",
+ "noNoninteractiveElementToInteractiveRole": "off",
+ "noNoninteractiveTabindex": "off",
+ "noPositiveTabindex": "off",
+ "noRedundantAlt": "off",
+ "noRedundantRoles": "off",
+ "noStaticElementInteractions": "off",
+ "noSvgWithoutTitle": "off",
+ "useAltText": "off",
+ "useAnchorContent": "off",
+ "useAriaActivedescendantWithTabindex": "off",
+ "useAriaPropsForRole": "off",
+ "useAriaPropsSupportedByRole": "off",
+ "useButtonType": "off",
+ "useFocusableInteractive": "off",
+ "useGenericFontNames": "off",
+ "useHeadingContent": "off",
+ "useHtmlLang": "off",
+ "useIframeTitle": "off",
+ "useKeyWithClickEvents": "off",
+ "useKeyWithMouseEvents": "off",
+ "useMediaCaption": "off",
+ "useSemanticElements": "off",
+ "useValidAnchor": "off",
+ "useValidAriaProps": "off",
+ "useValidAriaRole": "off",
+ "useValidAriaValues": "off",
+ "useValidAutocomplete": "off",
+ "useValidLang": "off"
}
}
},
diff --git a/examples/next-pages/src/components/Clip.tsx b/examples/next-pages/src/components/Clip.tsx
index 46b2643e..c7033323 100644
--- a/examples/next-pages/src/components/Clip.tsx
+++ b/examples/next-pages/src/components/Clip.tsx
@@ -1,10 +1,9 @@
-import { toast } from "sonner";
+import { ClipIcon, LoadingIcon } from "@livepeer/react/assets";
import * as Player from "@livepeer/react/player";
-
-import { ClipIcon, LoadingIcon } from "@livepeer/react/assets";
import type { ClipPayload } from "livepeer/models/components";
import { useCallback, useState } from "react";
+import { toast } from "sonner";
export function Clip({ className }: { className?: string }) {
const [pending, setIsPending] = useState(false);
diff --git a/examples/next-pages/src/components/Player.tsx b/examples/next-pages/src/components/Player.tsx
index 1e8b0706..bdc09299 100644
--- a/examples/next-pages/src/components/Player.tsx
+++ b/examples/next-pages/src/components/Player.tsx
@@ -1,4 +1,3 @@
-import type { ApiError, CreateSignedPlaybackResponse } from "@/pages/api/jwt";
import type { Src } from "@livepeer/react";
import {
EnterFullscreenIcon,
@@ -14,6 +13,7 @@ import {
} from "@livepeer/react/assets";
import * as Player from "@livepeer/react/player";
import { useEffect, useState } from "react";
+import type { ApiError, CreateSignedPlaybackResponse } from "@/pages/api/jwt";
import { Clip } from "./Clip";
import { Settings } from "./Settings";
diff --git a/examples/next-pages/src/components/Settings.tsx b/examples/next-pages/src/components/Settings.tsx
index 93177c81..3ceb0de5 100644
--- a/examples/next-pages/src/components/Settings.tsx
+++ b/examples/next-pages/src/components/Settings.tsx
@@ -1,10 +1,9 @@
+import { SettingsIcon } from "@livepeer/react/assets";
import * as Player from "@livepeer/react/player";
import * as Popover from "@radix-ui/react-popover";
-
-import { cn } from "@/lib/utils";
-import { SettingsIcon } from "@livepeer/react/assets";
import { CheckIcon, ChevronDownIcon, XIcon } from "lucide-react";
import React from "react";
+import { cn } from "@/lib/utils";
export const Settings = React.forwardRef(
(
diff --git a/examples/next-pages/src/pages/api/clip.ts b/examples/next-pages/src/pages/api/clip.ts
index dd1cd2ff..b5b2c550 100644
--- a/examples/next-pages/src/pages/api/clip.ts
+++ b/examples/next-pages/src/pages/api/clip.ts
@@ -1,6 +1,6 @@
-import { livepeer } from "@/lib/livepeer";
import type { NextApiRequest, NextApiResponse } from "next";
import { z } from "zod";
+import { livepeer } from "@/lib/livepeer";
type ResponseData =
| {
diff --git a/examples/next-pages/src/pages/index.tsx b/examples/next-pages/src/pages/index.tsx
index bdd4e4d2..0397bae6 100644
--- a/examples/next-pages/src/pages/index.tsx
+++ b/examples/next-pages/src/pages/index.tsx
@@ -1,8 +1,7 @@
-import { PlayerWithControls } from "@/components/Player";
-import { livepeer } from "@/lib/livepeer";
import { getSrc } from "@livepeer/react/external";
-
import type { InferGetServerSidePropsType } from "next";
+import { PlayerWithControls } from "@/components/Player";
+import { livepeer } from "@/lib/livepeer";
const playbackId = "9491n0th73i8hlpi";
diff --git a/examples/next/src/app/broadcast/Broadcast.tsx b/examples/next/src/app/broadcast/Broadcast.tsx
index efd4b82a..d5e94839 100644
--- a/examples/next/src/app/broadcast/Broadcast.tsx
+++ b/examples/next/src/app/broadcast/Broadcast.tsx
@@ -40,6 +40,7 @@ export function BroadcastWithControls() {
/>
{streamKey ? (
+ // biome-ignore lint/complexity/noUselessFragments: ignored using `--suppress`
<>