From bcf40bbf26211255997c3474047be7609208e55e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Fri, 11 Feb 2022 15:20:10 -0700 Subject: [PATCH] Lint fixes (#1826) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- apps/web/components/booking/BookingListItem.tsx | 4 ++-- apps/web/components/ui/form/CheckedSelect.tsx | 8 +++++--- apps/web/components/ui/modal/SetTimesModal.tsx | 1 + .../integrations/calendar/interfaces/Calendar.ts | 2 +- .../calendar/services/BaseCalendarService.ts | 2 +- apps/web/package.json | 2 +- apps/web/pages/[user]/book.tsx | 13 ++++++++----- apps/web/pages/api/user/profile.ts | 2 +- apps/web/pages/index.tsx | 3 ++- apps/web/pages/team/[slug]/book.tsx | 2 +- 10 files changed, 23 insertions(+), 16 deletions(-) diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx index fc4ce8689f..3ffb359d7a 100644 --- a/apps/web/components/booking/BookingListItem.tsx +++ b/apps/web/components/booking/BookingListItem.tsx @@ -8,10 +8,10 @@ import { HttpError } from "@lib/core/http/error"; import { useLocale } from "@lib/hooks/useLocale"; import { inferQueryOutput, trpc } from "@lib/trpc"; -import { TextArea } from "@components/form/fields"; -import TableActions, { ActionType } from "@components/ui/TableActions"; import { Dialog, DialogClose, DialogContent, DialogFooter, DialogHeader } from "@components/Dialog"; +import { TextArea } from "@components/form/fields"; import Button from "@components/ui/Button"; +import TableActions, { ActionType } from "@components/ui/TableActions"; type BookingItem = inferQueryOutput<"viewer.bookings">["bookings"][number]; diff --git a/apps/web/components/ui/form/CheckedSelect.tsx b/apps/web/components/ui/form/CheckedSelect.tsx index b3d2be90bd..fa5f8aa7a2 100644 --- a/apps/web/components/ui/form/CheckedSelect.tsx +++ b/apps/web/components/ui/form/CheckedSelect.tsx @@ -1,10 +1,12 @@ -import Avatar from "@components/ui/Avatar"; -import Select from "@components/ui/form/Select"; import { CheckIcon, XIcon } from "@heroicons/react/outline"; -import { useLocale } from "@lib/hooks/useLocale"; import React, { useEffect, useState } from "react"; import { MultiValue } from "react-select"; +import { useLocale } from "@lib/hooks/useLocale"; + +import Avatar from "@components/ui/Avatar"; +import Select from "@components/ui/form/Select"; + type CheckedSelectValue = { avatar: string; label: string; diff --git a/apps/web/components/ui/modal/SetTimesModal.tsx b/apps/web/components/ui/modal/SetTimesModal.tsx index a31559d17f..c564716f6f 100644 --- a/apps/web/components/ui/modal/SetTimesModal.tsx +++ b/apps/web/components/ui/modal/SetTimesModal.tsx @@ -3,6 +3,7 @@ import { useRef } from "react"; import { useLocale } from "@lib/hooks/useLocale"; import showToast from "@lib/notification"; + import Button from "@components/ui/Button"; interface SetTimesModalProps { diff --git a/apps/web/lib/integrations/calendar/interfaces/Calendar.ts b/apps/web/lib/integrations/calendar/interfaces/Calendar.ts index 9bb21237ea..d794fa1f1a 100644 --- a/apps/web/lib/integrations/calendar/interfaces/Calendar.ts +++ b/apps/web/lib/integrations/calendar/interfaces/Calendar.ts @@ -3,12 +3,12 @@ import { TFunction } from "next-i18next"; import { PaymentInfo } from "@ee/lib/stripe/server"; +import type { Event } from "@lib/events/EventManager"; import { Ensure } from "@lib/types/utils"; import { VideoCallData } from "@lib/videoClient"; import { NewCalendarEventType } from "../constants/types"; import { ConferenceData } from "./GoogleCalendar"; -import type { Event } from "@lib/events/EventManager"; export type Person = { name: string; diff --git a/apps/web/lib/integrations/calendar/services/BaseCalendarService.ts b/apps/web/lib/integrations/calendar/services/BaseCalendarService.ts index 18d77b750c..862015b615 100644 --- a/apps/web/lib/integrations/calendar/services/BaseCalendarService.ts +++ b/apps/web/lib/integrations/calendar/services/BaseCalendarService.ts @@ -18,6 +18,7 @@ import { v4 as uuidv4 } from "uuid"; import { getLocation, getRichDescription } from "@lib/CalEventParser"; import { symmetricDecrypt } from "@lib/crypto"; +import type { Event } from "@lib/events/EventManager"; import logger from "@lib/logger"; import { TIMEZONE_FORMAT } from "../constants/formats"; @@ -25,7 +26,6 @@ import { CALDAV_CALENDAR_TYPE } from "../constants/generals"; import { CalendarEventType, EventBusyDate, NewCalendarEventType } from "../constants/types"; import { Calendar, CalendarEvent, IntegrationCalendar } from "../interfaces/Calendar"; import { convertDate, getAttendees, getDuration } from "../utils/CalendarUtils"; -import type { Event } from "@lib/events/EventManager"; dayjs.extend(utc); dayjs.extend(timezone); diff --git a/apps/web/package.json b/apps/web/package.json index f6431e72f4..a5c2ce1ac1 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -170,4 +170,4 @@ "prisma": { "seed": "ts-node ./prisma/seed.ts" } -} \ No newline at end of file +} diff --git a/apps/web/pages/[user]/book.tsx b/apps/web/pages/[user]/book.tsx index 6d557d887f..67e9087ac7 100644 --- a/apps/web/pages/[user]/book.tsx +++ b/apps/web/pages/[user]/book.tsx @@ -1,15 +1,18 @@ -import BookingPage from "@components/booking/pages/BookingPage"; -import { asStringOrThrow } from "@lib/asStringOrNull"; -import prisma from "@lib/prisma"; -import { inferSSRProps } from "@lib/types/inferSSRProps"; import { Prisma } from "@prisma/client"; -import { ssrInit } from "@server/lib/ssr"; import dayjs from "dayjs"; import timezone from "dayjs/plugin/timezone"; import utc from "dayjs/plugin/utc"; import { GetServerSidePropsContext } from "next"; import { JSONObject } from "superjson/dist/types"; +import { asStringOrThrow } from "@lib/asStringOrNull"; +import prisma from "@lib/prisma"; +import { inferSSRProps } from "@lib/types/inferSSRProps"; + +import BookingPage from "@components/booking/pages/BookingPage"; + +import { ssrInit } from "@server/lib/ssr"; + dayjs.extend(utc); dayjs.extend(timezone); diff --git a/apps/web/pages/api/user/profile.ts b/apps/web/pages/api/user/profile.ts index 084d2bf969..4a510cc42a 100644 --- a/apps/web/pages/api/user/profile.ts +++ b/apps/web/pages/api/user/profile.ts @@ -1,3 +1,4 @@ +import { PrismaClientKnownRequestError } from "@prisma/client/runtime"; import { pick } from "lodash"; import type { NextApiRequest, NextApiResponse } from "next"; @@ -5,7 +6,6 @@ import { getSession } from "@lib/auth"; import prisma from "@lib/prisma"; import { resizeBase64Image } from "@server/lib/resizeBase64Image"; -import { PrismaClientKnownRequestError } from "@prisma/client/runtime"; export default async function handler(req: NextApiRequest, res: NextApiResponse) { const session = await getSession({ req: req }); diff --git a/apps/web/pages/index.tsx b/apps/web/pages/index.tsx index 36899d4482..8730636947 100644 --- a/apps/web/pages/index.tsx +++ b/apps/web/pages/index.tsx @@ -1,6 +1,7 @@ -import { getSession } from "@lib/auth"; import { NextPageContext } from "next"; +import { getSession } from "@lib/auth"; + function RedirectPage() { return; } diff --git a/apps/web/pages/team/[slug]/book.tsx b/apps/web/pages/team/[slug]/book.tsx index ec7c1aa1a9..1772952ece 100644 --- a/apps/web/pages/team/[slug]/book.tsx +++ b/apps/web/pages/team/[slug]/book.tsx @@ -1,3 +1,4 @@ +import { Prisma } from "@prisma/client"; import { GetServerSidePropsContext } from "next"; import { JSONObject } from "superjson/dist/types"; @@ -6,7 +7,6 @@ import prisma from "@lib/prisma"; import { inferSSRProps } from "@lib/types/inferSSRProps"; import BookingPage from "@components/booking/pages/BookingPage"; -import { Prisma } from "@prisma/client"; export type TeamBookingPageProps = inferSSRProps;