diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 476b897..e965807 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -49,9 +49,9 @@ module.exports = { }, rules: { // Leave these off, they're dumb - "react/display-name": "off", "react/prop-types": "off", - } + "import/namespace": "off", + }, }, // Typescript @@ -77,8 +77,9 @@ module.exports = { ], rules: { - "@typescript-eslint/no-unused-vars": "warn" - } + "@typescript-eslint/no-unused-vars": "warn", + "import/namespace": "off", + }, }, // Node diff --git a/app/entry.server.tsx b/app/entry.server.tsx index 67c0adf..fc050dc 100644 --- a/app/entry.server.tsx +++ b/app/entry.server.tsx @@ -1,15 +1,13 @@ -import * as Sentry from "@sentry/remix"; import { PassThrough } from "node:stream"; - -import type { AppLoadContext, EntryContext } from "@remix-run/node"; +import type { EntryContext } from "@remix-run/node"; import { createReadableStreamFromReadable } from "@remix-run/node"; import { RemixServer } from "@remix-run/react"; import * as isbotModule from "isbot"; import { renderToPipeableStream } from "react-dom/server"; -export const handleError = Sentry.wrapHandleErrorWithSentry((error, { request }) => { - // Custom handleError implementation -}); +// export const handleError = Sentry.wrapHandleErrorWithSentry((error, { request }) => { +// // Custom handleError implementation +// }); const ABORT_DELAY = 5_000; @@ -17,10 +15,9 @@ export default function handleRequest( request: Request, responseStatusCode: number, responseHeaders: Headers, - remixContext: EntryContext, - loadContext: AppLoadContext + remixContext: EntryContext ) { - let prohibitOutOfOrderStreaming = + const prohibitOutOfOrderStreaming = isBotRequest(request.headers.get("user-agent")) || remixContext.isSpaMode; return prohibitOutOfOrderStreaming @@ -38,9 +35,6 @@ export default function handleRequest( ); } -// We have some Remix apps in the wild already running with isbot@3 so we need -// to maintain backwards compatibility even though we want new apps to use -// isbot@4. That way, we can ship this as a minor Semver update to @remix-run/dev. function isBotRequest(userAgent: string | null) { if (!userAgent) { return false; @@ -51,11 +45,6 @@ function isBotRequest(userAgent: string | null) { return isbotModule.isbot(userAgent); } - // isbot < 3.8.0 - if ("default" in isbotModule && typeof isbotModule.default === "function") { - return isbotModule.default(userAgent); - } - return false; } @@ -157,4 +146,4 @@ function handleBrowserRequest( setTimeout(abort, ABORT_DELAY); }); -} \ No newline at end of file +} diff --git a/app/func/__tests__/add_person.test.ts b/app/func/__tests__/add_person.test.ts index bd97f6a..dc4403f 100644 --- a/app/func/__tests__/add_person.test.ts +++ b/app/func/__tests__/add_person.test.ts @@ -1,4 +1,4 @@ -import { expect, fit } from "@jest/globals"; +import { expect } from "@jest/globals"; import add_person from "../add_person"; import { FRIZZLE, PB_RED, PROJECT_START } from "./common"; import { can_a_pairing_be_made, floating_people } from "../utils"; diff --git a/app/root.tsx b/app/root.tsx index 050b59c..e72b7b3 100644 --- a/app/root.tsx +++ b/app/root.tsx @@ -74,4 +74,4 @@ export function ErrorBoundary() { ); -} \ No newline at end of file +} diff --git a/app/routes/_index.tsx b/app/routes/_index.tsx index 0cfc555..9f553d5 100644 --- a/app/routes/_index.tsx +++ b/app/routes/_index.tsx @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ import { redirect } from "@remix-run/node"; export function headers({ diff --git a/app/routes/home.login.tsx b/app/routes/home.login.tsx index 4509e97..24bb76b 100644 --- a/app/routes/home.login.tsx +++ b/app/routes/home.login.tsx @@ -1,4 +1,3 @@ -import React from "react"; import { ActionFunctionArgs } from "@remix-run/node"; import { Form, Link, useActionData } from "@remix-run/react"; import { PROJECT_PASS, authenticator } from "~/services/auth.server"; diff --git a/app/routes/home.tsx b/app/routes/home.tsx index 787eca0..7df6032 100644 --- a/app/routes/home.tsx +++ b/app/routes/home.tsx @@ -1,14 +1,7 @@ -import { Outlet, useActionData } from "@remix-run/react"; +import { Outlet } from "@remix-run/react"; import { LoaderFunctionArgs, LinksFunction } from "@remix-run/node"; import { Footer } from "~/routes/project.$projectId/components/ui/Footer"; -import { ErrorResponse } from "~/models/Error.model"; - -type ActionData = { - action: string; - error: ErrorResponse; -}; - import homeStyles from "~/styles/home.css?url"; import { authenticator } from "~/services/auth.server"; @@ -24,19 +17,6 @@ export const loader = async ({ request }: LoaderFunctionArgs) => { }; export default function Home() { - let signUpErrorResponse: ErrorResponse = {}; - let loginErrorResponse: ErrorResponse = {}; - - const actionData = useActionData(); - - if (actionData?.error && actionData?.action == "sign-up") { - signUpErrorResponse = actionData?.error; - } - - if (actionData?.error && actionData?.action == "login") { - loginErrorResponse = actionData?.error; - } - return (
diff --git a/app/routes/project.$projectId/ProjectView.tsx b/app/routes/project.$projectId/ProjectView.tsx index c122a85..54a51a9 100644 --- a/app/routes/project.$projectId/ProjectView.tsx +++ b/app/routes/project.$projectId/ProjectView.tsx @@ -1,4 +1,4 @@ -import { useContext } from "react"; +import React, { useContext } from "react"; import { ProjectContext } from "./contexts/ProjectContext"; import { Workspace } from "./contexts/Workspace"; import { Button } from "~/ui/Button"; diff --git a/app/routes/project.$projectId/components/ui/BannerView.tsx b/app/routes/project.$projectId/components/ui/BannerView.tsx index abf5cd9..fb1f29e 100644 --- a/app/routes/project.$projectId/components/ui/BannerView.tsx +++ b/app/routes/project.$projectId/components/ui/BannerView.tsx @@ -1,4 +1,4 @@ -import { useContext } from "react"; +import React, { useContext } from "react"; import { ProjectContext } from "../../contexts/ProjectContext"; import ReactDOM from "react-dom"; import parritIcon from "~/styles/images/parrit-head.svg"; diff --git a/app/routes/project.$projectId/contexts/App.tsx b/app/routes/project.$projectId/contexts/App.tsx index 832725d..59546c8 100644 --- a/app/routes/project.$projectId/contexts/App.tsx +++ b/app/routes/project.$projectId/contexts/App.tsx @@ -1,4 +1,4 @@ -import { createContext, useState } from "react"; +import React, { createContext, useState } from "react"; import classNames from "classnames"; import { ProjectView } from "../ProjectView"; import { Footer } from "../components/ui/Footer"; diff --git a/app/routes/project.$projectId/route.tsx b/app/routes/project.$projectId/route.tsx index ea4de95..cb37b2c 100644 --- a/app/routes/project.$projectId/route.tsx +++ b/app/routes/project.$projectId/route.tsx @@ -2,7 +2,6 @@ import { ActionFunctionArgs, LinksFunction, LoaderFunctionArgs, - redirect, } from "@remix-run/node"; import hydrateProjectServer from "./hydrateProject.server"; @@ -48,6 +47,5 @@ export async function loader(args: LoaderFunctionArgs) { return await hydrateProjectServer(args); } -export default function () { - return ; -} +const ProjectPage = () => ; +export default ProjectPage; diff --git a/app/routes/sentry-example-page.tsx b/app/routes/sentry-example-page.tsx index 23ded39..a0b2b74 100644 --- a/app/routes/sentry-example-page.tsx +++ b/app/routes/sentry-example-page.tsx @@ -1,65 +1,66 @@ - export default function SentryExamplePage() { - return ( -
-
+
+

+ {/* biome-ignore lint/a11y/noSvgWithoutTitle: */} + - -

- {/* biome-ignore lint/a11y/noSvgWithoutTitle: */} - - - -

+ xmlns="http://www.w3.org/2000/svg" + viewBox="0 0 200 44" + > + + +

-

Get started by sending us a sample error:

+

Get started by sending us a sample error:

- + -

- Next, look for the error on the{" "} - Issues Page. -

-

- For more information, see{" "} - - https://docs.sentry.io/platforms/javascript/guides/remix/ - -

-
-
- ); +

+ Next, look for the error on the{" "} + + Issues Page + + . +

+

+ For more information, see{" "} + + https://docs.sentry.io/platforms/javascript/guides/remix/ + +

+
+
+ ); }