From dae9232d7a602a6d0a1bca981eff4991c4fa3278 Mon Sep 17 00:00:00 2001 From: Logan McAnsh Date: Mon, 30 Jan 2023 11:42:03 -0500 Subject: [PATCH] fix: lint Signed-off-by: Logan McAnsh --- dataloader/app/loaders/userLoader.ts | 2 +- dataloader/app/routes/users.tsx | 5 +++-- dataloader/app/routes/users/index.tsx | 3 ++- file-and-cloudinary-upload/app/utils/utils.server.ts | 3 ++- pm-app/app/routes/register.tsx | 6 +++--- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/dataloader/app/loaders/userLoader.ts b/dataloader/app/loaders/userLoader.ts index 4342f7a44..b9388a8c2 100644 --- a/dataloader/app/loaders/userLoader.ts +++ b/dataloader/app/loaders/userLoader.ts @@ -1,4 +1,4 @@ -import { DataFunctionArgs } from "@remix-run/node"; +import type { DataFunctionArgs } from "@remix-run/node"; import DataLoader from "dataloader"; import { db } from "~/data.server"; diff --git a/dataloader/app/routes/users.tsx b/dataloader/app/routes/users.tsx index bef3b7ef1..4cd7f39e2 100644 --- a/dataloader/app/routes/users.tsx +++ b/dataloader/app/routes/users.tsx @@ -1,7 +1,8 @@ import { json } from "@remix-run/node"; import { Outlet, useLoaderData } from "@remix-run/react"; -import { User } from "~/data.server"; -import { DataLoaderArgs } from "~/loaders/userLoader"; + +import type { User } from "~/data.server"; +import type { DataLoaderArgs } from "~/loaders/userLoader"; export const loader = async ({ context }: DataLoaderArgs) => { const users = await context.loaders.usersById.loadMany([ diff --git a/dataloader/app/routes/users/index.tsx b/dataloader/app/routes/users/index.tsx index e44b7da55..2cda57eab 100644 --- a/dataloader/app/routes/users/index.tsx +++ b/dataloader/app/routes/users/index.tsx @@ -1,6 +1,7 @@ import { json } from "@remix-run/node"; import { useLoaderData } from "@remix-run/react"; -import { DataLoaderArgs } from "~/loaders/userLoader"; + +import type { DataLoaderArgs } from "~/loaders/userLoader"; export const loader = async ({ context }: DataLoaderArgs) => { /* diff --git a/file-and-cloudinary-upload/app/utils/utils.server.ts b/file-and-cloudinary-upload/app/utils/utils.server.ts index 4cc1714e2..55f8be835 100644 --- a/file-and-cloudinary-upload/app/utils/utils.server.ts +++ b/file-and-cloudinary-upload/app/utils/utils.server.ts @@ -1,4 +1,5 @@ -import cloudinary, { UploadApiResponse } from "cloudinary"; +import type { UploadApiResponse } from "cloudinary"; +import cloudinary from "cloudinary"; import { writeAsyncIterableToWritable } from "@remix-run/node"; cloudinary.v2.config({ diff --git a/pm-app/app/routes/register.tsx b/pm-app/app/routes/register.tsx index 4a9e8d344..37b9837c8 100644 --- a/pm-app/app/routes/register.tsx +++ b/pm-app/app/routes/register.tsx @@ -126,13 +126,13 @@ export const action = async ({ request }: ActionArgs) => { export default function Register() { const actionData = useActionData(); - let fieldErrors = + const fieldErrors = actionData && "fieldErrors" in actionData ? actionData.fieldErrors : undefined; - let formError = + const formError = actionData && "formError" in actionData ? actionData.formError : undefined; - let fields = + const fields = actionData && "fields" in actionData ? actionData.fields : undefined; const [searchParams] = useSearchParams();