Skip to content

Commit 528b74d

Browse files
committed
chore: fix all lint warnings across codebase
Resolve 86 lint warnings reported by vp check: prefix unused variables/params with _, remove unused catch bindings, delete unused imports, convert ternary-as-statement to if/else, add missing JSX keys, fix React hook dependency arrays, wrap handlers in useCallback, and suppress intentional lint exceptions.
1 parent 8d93c35 commit 528b74d

57 files changed

Lines changed: 130 additions & 87 deletions

File tree

Some content is hidden

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

docs/app/(home)/error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useEffect } from "react";
66

77
export default function Error({
88
error,
9-
reset,
9+
reset: _reset,
1010
}: {
1111
error: Error & { digest?: string };
1212
reset: () => void;

docs/app/[...slug]/error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useEffect } from "react";
66

77
export default function Error({
88
error,
9-
reset,
9+
reset: _reset,
1010
}: {
1111
error: Error & { digest?: string };
1212
reset: () => void;

docs/app/demo/_components/DemoEditor.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ function DemoEditorInner({
202202
doc,
203203
);
204204
return { doc, provider };
205-
}, [roomId, activeUser]);
205+
// eslint-disable-next-line react-hooks/exhaustive-deps
206+
}, [roomId]);
206207
// Thread Store
207208
const threadStore = useMemo(() => {
208209
return new YjsThreadStore(

docs/app/docs/error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useEffect } from "react";
66

77
export default function Error({
88
error,
9-
reset,
9+
reset: _reset,
1010
}: {
1111
error: Error & { digest?: string };
1212
reset: () => void;

docs/app/examples/error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useEffect } from "react";
66

77
export default function Error({
88
error,
9-
reset,
9+
reset: _reset,
1010
}: {
1111
error: Error & { digest?: string };
1212
reset: () => void;

docs/app/not-found.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default function NotFound() {
7979
.slice(0, 8);
8080

8181
setSearchResults(pageResults.length > 0 ? pageResults : fallbackPages);
82-
} catch (error) {
82+
} catch {
8383
setSearchResults(fallbackPages);
8484
} finally {
8585
setIsLoading(false);

docs/components/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ export function FooterContent() {
145145
);
146146
}
147147

148-
export function Footer({ menu }: { menu?: boolean }): ReactElement {
148+
export function Footer({ menu: _menu }: { menu?: boolean }): ReactElement {
149149
return (
150150
<footer className="relative z-30 border-t border-stone-200 bg-stone-50">
151151
<div

docs/emails/magic-link.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,6 @@ const button = {
9292
padding: "14px 7px",
9393
};
9494

95-
const anchor = {
95+
const _anchor = {
9696
textDecoration: "underline",
9797
};

docs/instrumentation-client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Sentry.init({
88
dsn: "https://31af815601e4174f4443c863953eebe7@o4508925169500160.ingest.de.sentry.io/4508925646078032",
99

1010
// Add optional integrations for additional features
11+
// eslint-disable-next-line import/namespace
1112
integrations: [Sentry.replayIntegration()],
1213

1314
// Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
@@ -31,4 +32,5 @@ Sentry.init({
3132
debug: false,
3233
});
3334

35+
// eslint-disable-next-line import/namespace
3436
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;

examples/01-basic/02-block-objects/src/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export default function App() {
3030
});
3131

3232
// Sets the initial document JSON
33+
// eslint-disable-next-line react-hooks/exhaustive-deps
3334
useEffect(() => setBlocks(editor.document), []);
3435

3536
// Renders the editor instance and its document JSON.

0 commit comments

Comments
 (0)