Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

ran prettier format

Steven Tey7c1608c0f5b1
diff --git a/.prettierignore b/.prettierignore
index 7f65b34bd6..960b39ac7e 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1 +1,5 @@
-/data/world-topo.json
\ No newline at end of file
+/data/world-topo.json
+yarn.lock
+node_modules
+.next
+.mailing
\ No newline at end of file
diff --git a/.prettierrc b/.prettierrc
index 0aa585d3fb..7baadc9cfa 100644
--- a/.prettierrc
+++ b/.prettierrc
@@ -1,4 +1,9 @@
{
+ "bracketSpacing": true,
+ "semi": true,
+ "trailingComma": "all",
+ "printWidth": 80,
+ "tabWidth": 2,
"importOrder": [
"^(next/(.*)$)|^(next$)",
"^(react/(.*)$)|^(react$)",
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
deleted file mode 100644
index 0a4019aca7..0000000000
--- a/.vscode/extensions.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
- // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
-
- // List of extensions which should be recommended for users of this workspace.
- "recommendations": [
- "esbenp.prettier-vscode",
- "Prisma.prisma",
- "bradlc.vscode-tailwindcss"
- ],
- // List of extensions recommended by VS Code that should not be recommended for users of this workspace.
- "unwantedRecommendations": []
-}
diff --git a/.vscode/settings.json b/.vscode/settings.json
deleted file mode 100644
index 1ac30151ab..0000000000
--- a/.vscode/settings.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "editor.formatOnPaste": true,
- "editor.formatOnSave": true,
- "editor.defaultFormatter": "esbenp.prettier-vscode"
-}
diff --git a/components/app/link-card.tsx b/components/app/link-card.tsx
index 4eb1d7d393..aa80dbf0f5 100644
--- a/components/app/link-card.tsx
+++ b/components/app/link-card.tsx
@@ -1,14 +1,14 @@
+import Link from "next/link";
+import { useRouter } from "next/router";
+import useSWR from "swr";
import BlurImage from "@/components/shared/blur-image";
import CopyButton from "@/components/shared/copy-button";
import { Chart, LoadingDots } from "@/components/shared/icons";
-import { useRouter } from "next/router";
-import useSWR from "swr";
-import { fetcher, nFormatter, linkConstructor, timeAgo } from "@/lib/utils";
-import Link from "next/link";
-import { LinkProps } from "@/lib/types";
import Tooltip, { TooltipContent } from "@/components/shared/tooltip";
import useProject from "@/lib/swr/use-project";
import useUsage from "@/lib/swr/use-usage";
+import { LinkProps } from "@/lib/types";
+import { fetcher, linkConstructor, nFormatter, timeAgo } from "@/lib/utils";
import { useAddEditLinkModal } from "./modals/add-edit-link-modal";
import { useDeleteLinkModal } from "./modals/delete-link-modal";
diff --git a/components/app/links-container.tsx b/components/app/links-container.tsx
index e9d329fc11..10646936d6 100644
--- a/components/app/links-container.tsx
+++ b/components/app/links-container.tsx
@@ -1,12 +1,12 @@
import { useRouter } from "next/router";
import useSWR from "swr";
-import { fetcher } from "@/lib/utils";
import LinkCard from "@/components/app/link-card";
import LinkCardPlaceholder from "@/components/app/link-card-placeholder";
-import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
import NoLinksPlaceholder from "@/components/app/no-links-placeholder";
-import { LinkProps } from "@/lib/types";
+import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
import useProject from "@/lib/swr/use-project";
+import { LinkProps } from "@/lib/types";
+import { fetcher } from "@/lib/utils";
export default function LinksContainer({
AddEditLinkButton,
diff --git a/components/app/modals/add-edit-link-modal.tsx b/components/app/modals/add-edit-link-modal.tsx
index e99eff13e4..8268e2ffe8 100644
--- a/components/app/modals/add-edit-link-modal.tsx
+++ b/components/app/modals/add-edit-link-modal.tsx
@@ -1,29 +1,29 @@
-import Modal from "@/components/shared/modal";
+import { useRouter } from "next/router";
import {
+ Dispatch,
+ SetStateAction,
useCallback,
useEffect,
useMemo,
useState,
- Dispatch,
- SetStateAction,
} from "react";
-import { useRouter } from "next/router";
+import TextareaAutosize from "react-textarea-autosize";
+import { mutate } from "swr";
+import { useDebounce } from "use-debounce";
import BlurImage from "@/components/shared/blur-image";
-import { LinkProps } from "@/lib/types";
-import { linkConstructor } from "@/lib/utils";
import {
- LoadingDots,
- LoadingCircle,
AlertCircleFill,
ChevronRight,
+ LoadingCircle,
+ LoadingDots,
UploadCloud,
} from "@/components/shared/icons";
-import { useDebounce } from "use-debounce";
-import TextareaAutosize from "react-textarea-autosize";
-import { mutate } from "swr";
+import Modal from "@/components/shared/modal";
import Tooltip, { TooltipContent } from "@/components/shared/tooltip";
import useProject from "@/lib/swr/use-project";
import useUsage from "@/lib/swr/use-usage";
+import { LinkProps } from "@/lib/types";
+import { linkConstructor } from "@/lib/utils";
function AddEditLinkModal({
showAddEditLinkModal,
diff --git a/components/app/modals/add-project-modal.tsx b/components/app/modals/add-project-modal.tsx
index 97bb99edb7..707b63222f 100644
--- a/components/app/modals/add-project-modal.tsx
+++ b/components/app/modals/add-project-modal.tsx
@@ -1,18 +1,18 @@
-import Modal from "@/components/shared/modal";
+import { useRouter } from "next/router";
import {
+ Dispatch,
+ FormEvent,
+ SetStateAction,
useCallback,
useEffect,
useMemo,
useState,
- Dispatch,
- FormEvent,
- SetStateAction,
} from "react";
-import { useRouter } from "next/router";
-import BlurImage from "@/components/shared/blur-image";
-import { LoadingDots, AlertCircleFill } from "@/components/shared/icons";
-import { useDebounce } from "use-debounce";
import { mutate } from "swr";
+import { useDebounce } from "use-debounce";
+import BlurImage from "@/components/shared/blur-image";
+import { AlertCircleFill, LoadingDots } from "@/components/shared/icons";
+import Modal from "@/components/shared/modal";
import { generateSlugFromName } from "@/lib/utils";
function AddProjectModalHelper({
diff --git a/components/app/modals/delete-link-modal.tsx b/components/app/modals/delete-link-modal.tsx
index 5489f0a73b..e0a3cee076 100644
--- a/components/app/modals/delete-link-modal.tsx
+++ b/components/app/modals/delete-link-modal.tsx
@@ -1,19 +1,19 @@
-import Modal from "@/components/shared/modal";
+import { useRouter } from "next/router";
import {
+ Dispatch,
+ SetStateAction,
useCallback,
useEffect,
useMemo,
useState,
- Dispatch,
- SetStateAction,
} from "react";
-import { useRouter } from "next/router";
+import { mutate } from "swr";
import BlurImage from "@/components/shared/blur-image";
import LoadingDots from "@/components/shared/icons/loading-dots";
-import { linkConstructor } from "@/lib/utils";
-import { mutate } from "swr";
+import Modal from "@/components/shared/modal";
import useProject from "@/lib/swr/use-project";
import { LinkProps } from "@/lib/types";
+import { linkConstructor } from "@/lib/utils";
function DeleteLinkModal({
showDeleteLinkModal,
diff --git a/components/app/modals/delete-project-modal.tsx b/components/app/modals/delete-project-modal.tsx
index 5d20e61eee..aeed2a243e 100644
--- a/components/app/modals/delete-project-modal.tsx
+++ b/components/app/modals/delete-project-modal.tsx
@@ -1,17 +1,17 @@
-import Modal from "@/components/shared/modal";
+import { useRouter } from "next/router";
import {
+ Dispatch,
+ SetStateAction,
useCallback,
useMemo,
useState,
- Dispatch,
- SetStateAction,
} from "react";
-import { useRouter } from "next/router";
+import toast from "react-hot-toast";
import { mutate } from "swr";
import BlurImage from "@/components/shared/blur-image";
import LoadingDots from "@/components/shared/icons/loading-dots";
+import Modal from "@/components/shared/modal";
import useProject from "@/lib/swr/use-project";
-import toast from "react-hot-toast";
function DeleteProjectModal({
showDeleteProjectModal,
diff --git a/components/app/modals/edit-domain-modal.tsx b/components/app/modals/edit-domain-modal.tsx
index 317061d187..dcfc459499 100644
--- a/components/app/modals/edit-domain-modal.tsx
+++ b/components/app/modals/edit-domain-modal.tsx
@@ -1,18 +1,18 @@
-import Modal from "@/components/shared/modal";
+import { useRouter } from "next/router";
import {
+ Dispatch,
+ SetStateAction,
useCallback,
useEffect,
useMemo,
useState,
- Dispatch,
- SetStateAction,
} from "react";
-import { useRouter } from "next/router";
+import { mutate } from "swr";
+import { useDebounce } from "use-debounce";
import BlurImage from "@/components/shared/blur-image";
-import LoadingDots from "@/components/shared/icons/loading-dots";
import { AlertCircleFill } from "@/components/shared/icons";
-import { useDebounce } from "use-debounce";
-import { mutate } from "swr";
+import LoadingDots from "@/components/shared/icons/loading-dots";
+import Modal from "@/components/shared/modal";
import useProject from "@/lib/swr/use-project";
function EditDomainModal({
diff --git a/components/app/modals/stats-modal.tsx b/components/app/modals/stats-modal.tsx
index 31bb9d7c11..04c52ca218 100644
--- a/components/app/modals/stats-modal.tsx
+++ b/components/app/modals/stats-modal.tsx
@@ -1,15 +1,15 @@
-import Modal from "@/components/shared/modal";
+import { useRouter } from "next/router";
import {
+ Dispatch,
+ SetStateAction,
useCallback,
useMemo,
useState,
- Dispatch,
- SetStateAction,
} from "react";
-import Stats from "@/components/stats";
import { UIEvent } from "react";
-import { useRouter } from "next/router";
import { X } from "@/components/shared/icons";
+import Modal from "@/components/shared/modal";
+import Stats from "@/components/stats";
function StatsModalHelper({
showStatsModal,
diff --git a/components/app/modals/upgrade-plan-modal.tsx b/components/app/modals/upgrade-plan-modal.tsx
index 274ea055bf..48f5a09da3 100644
--- a/components/app/modals/upgrade-plan-modal.tsx
+++ b/components/app/modals/upgrade-plan-modal.tsx
@@ -1,18 +1,18 @@
-import Modal from "@/components/shared/modal";
import {
+ Dispatch,
+ SetStateAction,
useCallback,
useMemo,
useState,
- Dispatch,
- SetStateAction,
} from "react";
import BlurImage from "@/components/shared/blur-image";
import LoadingDots from "@/components/shared/icons/loading-dots";
+import Modal from "@/components/shared/modal";
+import Slider from "@/components/shared/slider";
+import Switch from "@/components/shared/switch";
import { getStripe } from "@/lib/stripe/client";
import { PRO_TIERS } from "@/lib/stripe/constants";
import { nFormatter } from "@/lib/utils";
-import Slider from "@/components/shared/slider";
-import Switch from "@/components/shared/switch";
function UpgradePlanModal({
showUpgradePlanModal,
diff --git a/components/app/no-projects-placeholder.tsx b/components/app/no-projects-placeholder.tsx
index f4d6884aea..97df426bdf 100644
--- a/components/app/no-projects-placeholder.tsx
+++ b/components/app/no-projects-placeholder.tsx
@@ -1,5 +1,5 @@
-import BlurImage from "@/components/shared/blur-image";
import Link from "next/link";
+import BlurImage from "@/components/shared/blur-image";
export default function NoProjectsPlaceholder({
setShowAddProjectModal,
diff --git a/components/app/project-card.tsx b/components/app/project-card.tsx
index ce7ae7aa88..c6ab1dc3a8 100644
--- a/components/app/project-card.tsx
+++ b/components/app/project-card.tsx
@@ -1,14 +1,14 @@
import Link from "next/link";
import useSWR from "swr";
-import { fetcher, nFormatter } from "@/lib/utils";
-import { ProjectProps } from "@/lib/types";
+import BlurImage from "@/components/shared/blur-image";
import {
CheckCircleFill,
- XCircleFill,
Link as LinkIcon,
+ XCircleFill,
} from "@/components/shared/icons";
-import BlurImage from "@/components/shared/blur-image";
import Tooltip, { TooltipContent } from "@/components/shared/tooltip";
+import { ProjectProps } from "@/lib/types";
+import { fetcher, nFormatter } from "@/lib/utils";
export default function ProjectCard({
name,
diff --git a/components/app/settings/custom-domain/domain-configuration.tsx b/components/app/settings/custom-domain/domain-configuration.tsx
index 857fb72190..09dae505ff 100644
--- a/components/app/settings/custom-domain/domain-configuration.tsx
+++ b/components/app/settings/custom-domain/domain-configuration.tsx
@@ -1,6 +1,6 @@
+import { useState } from "react";
import { DomainVerificationStatusProps } from "@/lib/types";
import { getSubdomain } from "@/lib/utils";
-import { useState } from "react";
const InlineSnippet = ({ children }: { children: string }) => {
return (
diff --git a/components/app/settings/custom-domain/index.tsx b/components/app/settings/custom-domain/index.tsx
index 14900e5528..31f9035447 100644
--- a/components/app/settings/custom-domain/index.tsx
+++ b/components/app/settings/custom-domain/index.tsx
@@ -1,6 +1,5 @@
-import useSWR, { mutate } from "swr";
-import { fetcher } from "@/lib/utils";
import { useRouter } from "next/router";
+import useSWR, { mutate } from "swr";
import {
AlertCircleFill,
CheckCircleFill,
@@ -9,10 +8,11 @@ import {
LoadingDots,
XCircleFill,
} from "@/components/shared/icons";
-import { useEditDomainModal } from "../../modals/edit-domain-modal";
+import useProject from "@/lib/swr/use-project";
import { DomainVerificationStatusProps } from "@/lib/types";
+import { fetcher } from "@/lib/utils";
+import { useEditDomainModal } from "../../modals/edit-domain-modal";
import DomainConfiguration from "./domain-configuration";
-import useProject from "@/lib/swr/use-project";
export default function CustomDomain() {
const router = useRouter();
diff --git a/components/app/settings/landing-page.tsx b/components/app/settings/landing-page.tsx
index a75cf0278e..de705cc716 100644
--- a/components/app/settings/landing-page.tsx
+++ b/components/app/settings/landing-page.tsx
@@ -1,12 +1,12 @@
-import useProject from "@/lib/swr/use-project";
import { useRouter } from "next/router";
import { useState } from "react";
-import { Chart, LoadingDots } from "@/components/shared/icons";
-import { fetcher, nFormatter } from "@/lib/utils";
+import toast from "react-hot-toast";
import useSWR from "swr";
+import { Chart, LoadingDots } from "@/components/shared/icons";
import Tooltip, { TooltipContent } from "@/components/shared/tooltip";
-import toast from "react-hot-toast";
+import useProject from "@/lib/swr/use-project";
import useUsage from "@/lib/swr/use-usage";
+import { fetcher, nFormatter } from "@/lib/utils";
export default function DefaultPage() {
const router = useRouter();
diff --git a/components/app/settings/plan-usage.tsx b/components/app/settings/plan-usage.tsx
index b1577d5ebe..ff28a0634b 100644
--- a/components/app/settings/plan-usage.tsx
+++ b/components/app/settings/plan-usage.tsx
@@ -1,17 +1,17 @@
-import { useMemo, useState } from "react";
-import { getFirstAndLastDay, nFormatter } from "@/lib/utils";
import { useRouter } from "next/router";
-import Tooltip, { ProTiers } from "@/components/shared/tooltip";
+import { useMemo, useState } from "react";
+import { motion } from "framer-motion";
+import { useUpgradePlanModal } from "@/components/app/modals/upgrade-plan-modal";
import {
- Divider,
Infinity,
- QuestionCircle,
+ Divider,
LoadingDots,
+ QuestionCircle,
} from "@/components/shared/icons";
-import { motion } from "framer-motion";
-import useUsage from "@/lib/swr/use-usage";
+import Tooltip, { ProTiers } from "@/components/shared/tooltip";
import { getPlanFromUsageLimit } from "@/lib/stripe/constants";
-import { useUpgradePlanModal } from "@/components/app/modals/upgrade-plan-modal";
+import useUsage from "@/lib/swr/use-usage";
+import { getFirstAndLastDay, nFormatter } from "@/lib/utils";
export default function PlanUsage() {
const router = useRouter();
diff --git a/components/home/demo.tsx b/components/home/demo.tsx
index 22929ee068..dc8f00af0e 100644
--- a/components/home/demo.tsx
+++ b/components/home/demo.tsx
@@ -1,13 +1,13 @@
import { useState } from "react";
-import useLocalStorage from "@/lib/hooks/use-local-storage";
+import { motion } from "framer-motion";
+import { Toaster } from "react-hot-toast";
import LinkCard from "@/components/home/link-card";
import PlaceholderCard from "@/components/home/placeholder-card";
import { LoadingDots } from "@/components/shared/icons";
-import { motion } from "framer-motion";
-import { SimpleLinkProps } from "@/lib/types";
import Tooltip, { TooltipContent } from "@/components/shared/tooltip";
-import { Toaster } from "react-hot-toast";
import { FRAMER_MOTION_LIST_ITEM_VARIANTS } from "@/lib/constants";
+import useLocalStorage from "@/lib/hooks/use-local-storage";
+import { SimpleLinkProps } from "@/lib/types";
const Demo = () => {
const [saving, setSaving] = useState(false);
diff --git a/components/home/features.tsx b/components/home/features.tsx
index 1a904571af..cac570b371 100644
--- a/components/home/features.tsx
+++ b/components/home/features.tsx
@@ -1,9 +1,9 @@
+import Image from "next/future/image";
import Link from "next/link";
-import { Github, Chart, Airplay, UploadCloud } from "@/components/shared/icons";
+import { Airplay, Chart, Github, UploadCloud } from "@/components/shared/icons";
import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
-import Image from "next/future/image";
-import styles from "./features.module.css";
import CountingNumbers from "../shared/counting-numbers";
+import styles from "./features.module.css";
const Features = ({ stars }: { stars: number }) => {
return (
diff --git a/components/home/globe.tsx b/components/home/globe.tsx
index d071c88d09..0bafa09e9e 100644
--- a/components/home/globe.tsx
+++ b/components/home/globe.tsx
@@ -1,12 +1,12 @@
-import { useEffect, useRef, useState } from "react";
import Link from "next/link";
+import { useEffect, useRef, useState } from "react";
import createGlobe from "cobe";
+import { AnimatePresence, motion } from "framer-motion";
import { useSpring } from "react-spring";
import useSWR from "swr";
import { Drag, X } from "@/components/shared/icons";
-import { fetcher } from "@/lib/utils";
-import { motion, AnimatePresence } from "framer-motion";
import useIntersectionObserver from "@/lib/hooks/use-intersection-observer";
+import { fetcher } from "@/lib/utils";
interface MarkerProps {
location: [number, number];
diff --git a/components/home/link-card.tsx b/components/home/link-card.tsx
index 1afca29a0d..77ba7b6618 100644
--- a/components/home/link-card.tsx
+++ b/components/home/link-card.tsx
@@ -1,15 +1,15 @@
+import Link from "next/link";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
+import { motion, useAnimation, useMotionValue } from "framer-motion";
+import toast from "react-hot-toast";
+import useSWR from "swr";
+import { useDebouncedCallback } from "use-debounce";
import BlurImage from "@/components/shared/blur-image";
import CopyButton from "@/components/shared/copy-button";
import { Chart, LoadingDots } from "@/components/shared/icons";
-import useSWR from "swr";
-import { fetcher, nFormatter, linkConstructor } from "@/lib/utils";
-import Link from "next/link";
-import { motion, useMotionValue, useAnimation } from "framer-motion";
import { FRAMER_MOTION_LIST_ITEM_VARIANTS } from "@/lib/constants";
import { SimpleLinkProps } from "@/lib/types";
-import toast from "react-hot-toast";
-import { useDebouncedCallback } from "use-debounce";
+import { fetcher, linkConstructor, nFormatter } from "@/lib/utils";
export default function LinkCard({
_key: key,
diff --git a/components/home/pricing.tsx b/components/home/pricing.tsx
index 844aa1214e..4a68287a93 100644
--- a/components/home/pricing.tsx
+++ b/components/home/pricing.tsx
@@ -1,15 +1,15 @@
import Link from "next/link";
+import { useState } from "react";
import {
CheckCircleFill,
QuestionCircle,
XCircleFill,
} from "@/components/shared/icons";
import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
-import Tooltip, { OGImageProxy } from "@/components/shared/tooltip";
-import { useState } from "react";
import Slider from "@/components/shared/slider";
-import { nFormatter } from "@/lib/utils";
+import Tooltip, { OGImageProxy } from "@/components/shared/tooltip";
import { PRO_TIERS } from "@/lib/stripe/constants";
+import { nFormatter } from "@/lib/utils";
const pricingItems = [
{
diff --git a/components/home/vercel-edge-functions.tsx b/components/home/vercel-edge-functions.tsx
index 9491d60152..77c76bd459 100644
--- a/components/home/vercel-edge-functions.tsx
+++ b/components/home/vercel-edge-functions.tsx
@@ -1,4 +1,4 @@
-import { useState, useEffect } from "react";
+import { useEffect, useState } from "react";
export default function VercelEdgeFunctions() {
const [vercelFontColor, setVercelFontColor] = useState(
diff --git a/components/layout/app/index.tsx b/components/layout/app/index.tsx
index ce0182eef9..54436c23d9 100644
--- a/components/layout/app/index.tsx
+++ b/components/layout/app/index.tsx
@@ -1,13 +1,13 @@
-import { ReactNode } from "react";
import dynamic from "next/dynamic";
import Link from "next/link";
-import Meta from "../meta";
-import { Logo, Divider } from "@/components/shared/icons";
-import ListBox from "./list-box";
-import UserDropdown from "./user-dropdown";
import { useRouter } from "next/router";
import Script from "next/script";
+import { ReactNode } from "react";
import { Toaster } from "react-hot-toast";
+import { Divider, Logo } from "@/components/shared/icons";
+import Meta from "../meta";
+import ListBox from "./list-box";
+import UserDropdown from "./user-dropdown";
const CRISP_SCRIPT = `window.$crisp=[];window.CRISP_WEBSITE_ID="2c09b1ee-14c2-46d1-bf72-1dbb998a19e0";(function(){d=document;s=d.createElement("script");s.src="https://client.crisp.chat/l.js";s.async=1;d.getElementsByTagName("head")[0].appendChild(s);})();`;
diff --git a/components/layout/app/list-box.tsx b/components/layout/app/list-box.tsx
index 7ccac022c1..fba7800b38 100644
--- a/components/layout/app/list-box.tsx
+++ b/components/layout/app/list-box.tsx
@@ -1,14 +1,14 @@
+import { useRouter } from "next/router";
import { Fragment, useMemo } from "react";
import { Listbox, Transition } from "@headlessui/react";
-import { Tick, ChevronUpDown, PlusCircle } from "@/components/shared/icons";
-import { useRouter } from "next/router";
-import BlurImage from "@/components/shared/blur-image";
-import useSWR from "swr";
-import { fetcher } from "@/lib/utils";
-import { ProjectProps } from "@/lib/types";
import { useSession } from "next-auth/react";
+import useSWR from "swr";
import { useAddProjectModal } from "@/components/app/modals/add-project-modal";
+import BlurImage from "@/components/shared/blur-image";
+import { ChevronUpDown, PlusCircle, Tick } from "@/components/shared/icons";
import useUsage from "@/lib/swr/use-usage";
+import { ProjectProps } from "@/lib/types";
+import { fetcher } from "@/lib/utils";
export default function ListBox() {
const { data: projects } = useSWR<ProjectProps[]>("/api/projects", fetcher);
diff --git a/components/layout/app/nav-tabs.tsx b/components/layout/app/nav-tabs.tsx
index 4e955866a3..0d391adb5e 100644
--- a/components/layout/app/nav-tabs.tsx
+++ b/components/layout/app/nav-tabs.tsx
@@ -1,6 +1,6 @@
-import { useMemo } from "react";
import Link from "next/link";
import { NextRouter, useRouter } from "next/router";
+import { useMemo } from "react";
const TabsHelper = (router: NextRouter): { name: string; href: string }[] => {
const { slug, key } = router.query as {
diff --git a/components/layout/app/user-dropdown.tsx b/components/layout/app/user-dropdown.tsx
index c108206288..a36448e161 100644
--- a/components/layout/app/user-dropdown.tsx
+++ b/components/layout/app/user-dropdown.tsx
@@ -1,6 +1,6 @@
-import { Menu, Transition } from "@headlessui/react";
import { Fragment } from "react";
-import { useSession, signOut } from "next-auth/react";
+import { Menu, Transition } from "@headlessui/react";
+import { signOut, useSession } from "next-auth/react";
export default function UserDropdown() {
const { data: session } = useSession();
diff --git a/components/layout/home/index.tsx b/components/layout/home/index.tsx
index fb52b0aeb9..4fc08c7599 100644
--- a/components/layout/home/index.tsx
+++ b/components/layout/home/index.tsx
@@ -1,9 +1,9 @@
+import Image from "next/future/image";
+import Link from "next/link";
import { ReactNode } from "react";
import { useSession } from "next-auth/react";
-import Link from "next/link";
-import Meta from "../meta";
-import Image from "next/future/image";
import { Github, Logo, Twitter } from "@/components/shared/icons";
+import Meta from "../meta";
export default function HomeLayout({
children,
diff --git a/components/shared/blur-image.tsx b/components/shared/blur-image.tsx
index 63bb8c7df8..512d448ebb 100644
--- a/components/shared/blur-image.tsx
+++ b/components/shared/blur-image.tsx
@@ -1,5 +1,5 @@
import Image, { ImageProps } from "next/future/image";
-import { useState, useEffect } from "react";
+import { useEffect, useState } from "react";
export default function BlurImage(props: ImageProps) {
const [isLoading, setLoading] = useState(true);
diff --git a/components/shared/copy-button.tsx b/components/shared/copy-button.tsx
index aac85760b7..ab140a18da 100644
--- a/components/shared/copy-button.tsx
+++ b/components/shared/copy-button.tsx
@@ -1,5 +1,5 @@
import { useState } from "react";
-import { Tick, Copy } from "@/components/shared/icons";
+import { Copy, Tick } from "@/components/shared/icons";
export default function CopyButton({ url }: { url: string }) {
const [copied, setCopied] = useState(false);
diff --git a/components/shared/counting-numbers.tsx b/components/shared/counting-numbers.tsx
index a5d11af8e0..38f3512e63 100644
--- a/components/shared/counting-numbers.tsx
+++ b/components/shared/counting-numbers.tsx
@@ -1,5 +1,5 @@
-import { useInView } from "framer-motion";
import { useEffect, useRef, useState } from "react";
+import { useInView } from "framer-motion";
export default function CountingNumbers({
value,
diff --git a/components/shared/modal.tsx b/components/shared/modal.tsx
index d78881cc23..b21194eb9e 100644
--- a/components/shared/modal.tsx
+++ b/components/shared/modal.tsx
@@ -1,3 +1,4 @@
+import { useRouter } from "next/router";
import {
Dispatch,
SetStateAction,
@@ -5,9 +6,8 @@ import {
useEffect,
useRef,
} from "react";
-import { useRouter } from "next/router";
-import { motion, AnimatePresence, useAnimation } from "framer-motion";
import FocusTrap from "focus-trap-react";
+import { AnimatePresence, motion, useAnimation } from "framer-motion";
export default function Modal({
children,
diff --git a/components/shared/slider.tsx b/components/shared/slider.tsx
index 9b2a631080..7286b95f7f 100644
--- a/components/shared/slider.tsx
+++ b/components/shared/slider.tsx
@@ -1,5 +1,5 @@
-import * as SliderPrimitive from "@radix-ui/react-slider";
import { Dispatch, SetStateAction } from "react";
+import * as SliderPrimitive from "@radix-ui/react-slider";
const Slider = ({
value,
diff --git a/components/shared/switch.tsx b/components/shared/switch.tsx
index cdf1304313..be4d163bb8 100644
--- a/components/shared/switch.tsx
+++ b/components/shared/switch.tsx
@@ -1,6 +1,6 @@
+import { Dispatch, SetStateAction } from "react";
import * as SwitchPrimitive from "@radix-ui/react-switch";
import cx from "classnames";
-import { Dispatch, SetStateAction } from "react";
const Switch = ({
setState,
diff --git a/components/shared/tooltip.tsx b/components/shared/tooltip.tsx
index e53308a2dd..392e022cc1 100644
--- a/components/shared/tooltip.tsx
+++ b/components/shared/tooltip.tsx
@@ -1,8 +1,14 @@
-import * as TooltipPrimitive from "@radix-ui/react-tooltip";
+/***********************************/
+
+/* Tooltip Contents */
+import Link from "next/link";
import { ReactNode, useEffect, useRef, useState } from "react";
-import { motion, AnimatePresence, useAnimation } from "framer-motion";
-import { PRO_TIERS } from "@/lib/stripe/constants";
+import * as TooltipPrimitive from "@radix-ui/react-tooltip";
+import { AnimatePresence, motion, useAnimation } from "framer-motion";
+import BlurImage from "@/components/shared/blur-image";
import Slider from "@/components/shared/slider";
+import { PRO_TIERS } from "@/lib/stripe/constants";
+import { nFormatter } from "@/lib/utils";
export default function Tooltip({
children,
@@ -112,13 +118,6 @@ export default function Tooltip({
);
}
-/***********************************/
-/* Tooltip Contents */
-
-import Link from "next/link";
-import BlurImage from "@/components/shared/blur-image";
-import { nFormatter } from "@/lib/utils";
-
export function TooltipContent({
title,
cta,
diff --git a/components/stats/bar-chart/index.tsx b/components/stats/bar-chart/index.tsx
index 56a1f68bba..22df0fc4f2 100644
--- a/components/stats/bar-chart/index.tsx
+++ b/components/stats/bar-chart/index.tsx
@@ -1,15 +1,15 @@
+import { useRouter } from "next/router";
import { useMemo } from "react";
import { AxisBottom, AxisLeft } from "@visx/axis";
+import { localPoint } from "@visx/event";
import { GridRows } from "@visx/grid";
+import { withScreenSize } from "@visx/responsive";
import { scaleBand, scaleLinear } from "@visx/scale";
import { useTooltip, useTooltipInPortal } from "@visx/tooltip";
-import { localPoint } from "@visx/event";
-import { withScreenSize } from "@visx/responsive";
+import { motion } from "framer-motion";
import { IntervalProps, StatsProps, intervalData } from "@/lib/stats";
import { nFormatter } from "@/lib/utils";
import styles from "./index.module.css";
-import { motion } from "framer-motion";
-import { useRouter } from "next/router";
const LEFT_AXIS_WIDTH = 30;
const CHART_MAX_HEIGHT = 400;
diff --git a/components/stats/clicks.tsx b/components/stats/clicks.tsx
index a3f48915cf..92faf8d997 100644
--- a/components/stats/clicks.tsx
+++ b/components/stats/clicks.tsx
@@ -1,7 +1,7 @@
-import { nFormatter } from "@/lib/utils";
import { Chart } from "@/components/shared/icons";
import BarChart from "@/components/stats/bar-chart";
import { StatsProps } from "@/lib/stats";
+import { nFormatter } from "@/lib/utils";
export default function Clicks({
data,
diff --git a/components/stats/device-icon.tsx b/components/stats/device-icon.tsx
index bf2dc3eeb2..694851a5b3 100644
--- a/components/stats/device-icon.tsx
+++ b/components/stats/device-icon.tsx
@@ -1,6 +1,6 @@
-import { DeviceTabs } from "@/lib/stats";
-import { Chrome, Safari, Apple } from "components/shared/icons/devices";
import BlurImage from "@/components/shared/blur-image";
+import { Apple, Chrome, Safari } from "components/shared/icons/devices";
+import { DeviceTabs } from "@/lib/stats";
export default function DeviceIcon({
display,
diff --git a/components/stats/devices.tsx b/components/stats/devices.tsx
index 6568ab28c3..b562e27b93 100644
--- a/components/stats/devices.tsx
+++ b/components/stats/devices.tsx
@@ -1,10 +1,10 @@
-import { StatsProps, processDeviceData, DeviceTabs } from "@/lib/stats";
-import BadgeSelect from "@/components/shared/badge-select";
import { useMemo } from "react";
-import { nFormatter } from "@/lib/utils";
-import { useState, UIEvent } from "react";
+import { UIEvent, useState } from "react";
import { AnimatePresence, motion } from "framer-motion";
+import BadgeSelect from "@/components/shared/badge-select";
import { LoadingDots } from "@/components/shared/icons";
+import { DeviceTabs, StatsProps, processDeviceData } from "@/lib/stats";
+import { nFormatter } from "@/lib/utils";
import DeviceIcon from "./device-icon";
export default function Devices({ data: rawData }: { data: StatsProps }) {
diff --git a/components/stats/index.tsx b/components/stats/index.tsx
index a3f774b4eb..edc5460b81 100644
--- a/components/stats/index.tsx
+++ b/components/stats/index.tsx
@@ -1,11 +1,11 @@
-import { StatsProps, dummyData } from "@/lib/stats";
+import { useRouter } from "next/router";
+import useSWR from "swr";
import Clicks from "@/components/stats/clicks";
-import Toggle from "@/components/stats/toggle";
import Devices from "@/components/stats/devices";
import Locations from "@/components/stats/locations";
-import useSWR from "swr";
+import Toggle from "@/components/stats/toggle";
+import { StatsProps, dummyData } from "@/lib/stats";
import { fetcher } from "@/lib/utils";
-import { useRouter } from "next/router";
export default function Stats({
atModalTop,
diff --git a/components/stats/locations.tsx b/components/stats/locations.tsx
index 7c25d514f3..2bc1cf81f4 100644
--- a/components/stats/locations.tsx
+++ b/components/stats/locations.tsx
@@ -1,9 +1,9 @@
-import { StatsProps, processLocationData, LocationTabs } from "@/lib/stats";
-import BadgeSelect from "@/components/shared/badge-select";
import { useMemo } from "react";
-import { nFormatter } from "@/lib/utils";
-import { useState, UIEvent } from "react";
+import { UIEvent, useState } from "react";
import { AnimatePresence, motion } from "framer-motion";
+import BadgeSelect from "@/components/shared/badge-select";
+import { LocationTabs, StatsProps, processLocationData } from "@/lib/stats";
+import { nFormatter } from "@/lib/utils";
import { LoadingDots } from "../shared/icons";
export default function Locations({ data: rawData }: { data: StatsProps }) {
diff --git a/components/stats/toggle.tsx b/components/stats/toggle.tsx
index 851ff210cd..05ead2b2e8 100644
--- a/components/stats/toggle.tsx
+++ b/components/stats/toggle.tsx
@@ -1,11 +1,11 @@
import { useRouter } from "next/router";
+import { useMemo } from "react";
+import BadgeSelect from "@/components/shared/badge-select";
+import { ExpandingArrow } from "@/components/shared/icons";
import { INTERVALS } from "@/lib/constants";
-import { linkConstructor } from "@/lib/utils";
import useScroll from "@/lib/hooks/use-scroll";
-import { ExpandingArrow } from "@/components/shared/icons";
-import BadgeSelect from "@/components/shared/badge-select";
import { IntervalProps, StatsProps } from "@/lib/stats";
-import { useMemo } from "react";
+import { linkConstructor } from "@/lib/utils";
export default function Toggle({
domain,
diff --git a/emails/BelatedWelcome.tsx b/emails/BelatedWelcome.tsx
index a47512943f..18c543fc87 100644
--- a/emails/BelatedWelcome.tsx
+++ b/emails/BelatedWelcome.tsx
@@ -1,16 +1,16 @@
-import Head from "./components/Head";
-import Header from "./components/Header";
-import Footer from "./components/Footer";
-import Divider from "./components/Divider";
import {
Mjml,
MjmlBody,
- MjmlSection,
MjmlColumn,
+ MjmlImage,
+ MjmlSection,
MjmlText,
MjmlWrapper,
- MjmlImage,
} from "mjml-react";
+import Divider from "./components/Divider";
+import Footer from "./components/Footer";
+import Head from "./components/Head";
+import Header from "./components/Header";
import { grayDark, purple } from "./components/theme";
export default function WelcomeEmail({
diff --git a/emails/InvalidDomain.tsx b/emails/InvalidDomain.tsx
index 538e4fa394..0e9ca56527 100644
--- a/emails/InvalidDomain.tsx
+++ b/emails/InvalidDomain.tsx
@@ -1,16 +1,16 @@
-import Head from "./components/Head";
-import Header from "./components/Header";
-import Footer from "./components/Footer";
-import ButtonPrimary from "./components/ButtonPrimary";
-import Divider from "./components/Divider";
import {
Mjml,
MjmlBody,
- MjmlSection,
MjmlColumn,
+ MjmlSection,
MjmlText,
MjmlWrapper,
} from "mjml-react";
+import ButtonPrimary from "./components/ButtonPrimary";
+import Divider from "./components/Divider";
+import Footer from "./components/Footer";
+import Head from "./components/Head";
+import Header from "./components/Header";
import { grayDark, purple } from "./components/theme";
export default function InvalidDomain({
diff --git a/emails/LoginLink.tsx b/emails/LoginLink.tsx
index c91902cc21..12647b0d21 100644
--- a/emails/LoginLink.tsx
+++ b/emails/LoginLink.tsx
@@ -1,16 +1,16 @@
-import Head from "./components/Head";
-import Header from "./components/Header";
-import Footer from "./components/Footer";
-import ButtonPrimary from "./components/ButtonPrimary";
-import Divider from "./components/Divider";
import {
Mjml,
MjmlBody,
- MjmlSection,
MjmlColumn,
+ MjmlSection,
MjmlText,
MjmlWrapper,
} from "mjml-react";
+import ButtonPrimary from "./components/ButtonPrimary";
+import Divider from "./components/Divider";
+import Footer from "./components/Footer";
+import Head from "./components/Head";
+import Header from "./components/Header";
import { purple } from "./components/theme";
export default function LoginLink({ url }: { url: string }): JSX.Element {
diff --git a/emails/ProjectDeleted.tsx b/emails/ProjectDeleted.tsx
index babb3892ca..fb9e423af9 100644
--- a/emails/ProjectDeleted.tsx
+++ b/emails/ProjectDeleted.tsx
@@ -1,16 +1,16 @@
-import Head from "./components/Head";
-import Header from "./components/Header";
-import Footer from "./components/Footer";
-import ButtonPrimary from "./components/ButtonPrimary";
-import Divider from "./components/Divider";
import {
Mjml,
MjmlBody,
- MjmlSection,
MjmlColumn,
+ MjmlSection,
MjmlText,
MjmlWrapper,
} from "mjml-react";
+import ButtonPrimary from "./components/ButtonPrimary";
+import Divider from "./components/Divider";
+import Footer from "./components/Footer";
+import Head from "./components/Head";
+import Header from "./components/Header";
import { grayDark, purple } from "./components/theme";
export default function ProjectDeleted({
diff --git a/emails/UsageExceeded.tsx b/emails/UsageExceeded.tsx
index da2dd5fe37..4913e188e6 100644
--- a/emails/UsageExceeded.tsx
+++ b/emails/UsageExceeded.tsx
@@ -1,18 +1,18 @@
-import Head from "./components/Head";
-import Header from "./components/Header";
-import Footer from "./components/Footer";
-import ButtonPrimary from "./components/ButtonPrimary";
-import Divider from "./components/Divider";
import {
Mjml,
MjmlBody,
- MjmlSection,
MjmlColumn,
+ MjmlSection,
MjmlText,
MjmlWrapper,
} from "mjml-react";
import { getPlanFromUsageLimit } from "@/lib/stripe/constants";
import { nFormatter } from "@/lib/utils";
+import ButtonPrimary from "./components/ButtonPrimary";
+import Divider from "./components/Divider";
+import Footer from "./components/Footer";
+import Head from "./components/Head";
+import Header from "./components/Header";
import { grayDark } from "./components/theme";
export default function UsageExceeded({
diff --git a/emails/WelcomeEmail.tsx b/emails/WelcomeEmail.tsx
index 8dd0505024..c43ad6b944 100644
--- a/emails/WelcomeEmail.tsx
+++ b/emails/WelcomeEmail.tsx
@@ -1,16 +1,16 @@
-import Head from "./components/Head";
-import Header from "./components/Header";
-import Footer from "./components/Footer";
-import Divider from "./components/Divider";
import {
Mjml,
MjmlBody,
- MjmlSection,
MjmlColumn,
+ MjmlImage,
+ MjmlSection,
MjmlText,
MjmlWrapper,
- MjmlImage,
} from "mjml-react";
+import Divider from "./components/Divider";
+import Footer from "./components/Footer";
+import Head from "./components/Head";
+import Header from "./components/Header";
import { grayDark } from "./components/theme";
export default function WelcomeEmail({ name }: { name?: string }): JSX.Element {
diff --git a/emails/components/ButtonPrimary.tsx b/emails/components/ButtonPrimary.tsx
index dd3bfbdead..ad113cfffb 100644
--- a/emails/components/ButtonPrimary.tsx
+++ b/emails/components/ButtonPrimary.tsx
@@ -1,6 +1,6 @@
import { MjmlButton } from "mjml-react";
-import { black, white, grayLight } from "./theme";
-import { leadingTight, textSm, borderBase } from "./theme";
+import { black, grayLight, white } from "./theme";
+import { borderBase, leadingTight, textSm } from "./theme";
export default function ButtonPrimary({
link,
diff --git a/emails/components/Divider.tsx b/emails/components/Divider.tsx
index b3ec7d3297..0b9f89e29f 100644
--- a/emails/components/Divider.tsx
+++ b/emails/components/Divider.tsx
@@ -1,5 +1,5 @@
import { MjmlDivider } from "mjml-react";
-import { grayLight, grayDark } from "./theme";
+import { grayDark, grayLight } from "./theme";
export default function Divider(): JSX.Element {
return (
diff --git a/emails/components/Footer.tsx b/emails/components/Footer.tsx
index e6f03ef985..3ddfab1cbd 100644
--- a/emails/components/Footer.tsx
+++ b/emails/components/Footer.tsx
@@ -1,4 +1,4 @@
-import { MjmlSection, MjmlColumn, MjmlText } from "mjml-react";
+import { MjmlColumn, MjmlSection, MjmlText } from "mjml-react";
export default function Footer({
unsubscribe,
diff --git a/emails/components/Head.tsx b/emails/components/Head.tsx
index 51124192c8..e3183f7e86 100644
--- a/emails/components/Head.tsx
+++ b/emails/components/Head.tsx
@@ -1,11 +1,11 @@
import React from "react";
import {
- MjmlHead,
- MjmlFont,
- MjmlAttributes,
MjmlAll,
- MjmlStyle,
+ MjmlAttributes,
+ MjmlFont,
+ MjmlHead,
MjmlRaw,
+ MjmlStyle,
} from "mjml-react";
import { black, blue, grayDark, grayLight, purple } from "./theme";
diff --git a/emails/components/Header.tsx b/emails/components/Header.tsx
index 65b46ba653..8aa9972292 100644
--- a/emails/components/Header.tsx
+++ b/emails/components/Header.tsx
@@ -1,4 +1,4 @@
-import { MjmlSection, MjmlColumn, MjmlImage, MjmlText } from "mjml-react";
+import { MjmlColumn, MjmlImage, MjmlSection, MjmlText } from "mjml-react";
export default function Header({ title }: { title: string }): JSX.Element {
return (
diff --git a/emails/index.ts b/emails/index.ts
index 6807591e35..36052eefad 100644
--- a/emails/index.ts
+++ b/emails/index.ts
@@ -1,5 +1,5 @@
-import nodemailer from "nodemailer";
import { buildSendMail } from "mailing-core";
+import nodemailer from "nodemailer";
const sendMail = buildSendMail({
transport: nodemailer.createTransport({
diff --git a/lib/auth.ts b/lib/auth.ts
index c0feda3608..c830defbd8 100644
--- a/lib/auth.ts
+++ b/lib/auth.ts
@@ -1,9 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { unstable_getServerSession } from "next-auth/next";
import { authOptions } from "@/pages/api/auth/[...nextauth]";
+import { unstable_getServerSession } from "next-auth/next";
+import { FREE_PLAN_PROJECT_LIMIT } from "@/lib/constants";
import prisma from "@/lib/prisma";
import { ProjectProps, UsageProps, UserProps } from "@/lib/types";
-import { FREE_PLAN_PROJECT_LIMIT } from "@/lib/constants";
interface Session {
user: {
diff --git a/lib/cron/domains.tsx b/lib/cron/domains.tsx
index a5427f1b2b..56b06b3dd8 100644
--- a/lib/cron/domains.tsx
+++ b/lib/cron/domains.tsx
@@ -1,9 +1,9 @@
-import { redis, deleteProject } from "@/lib/upstash";
-import { removeDomain } from "@/lib/domains";
-import { log } from "@/lib/cron/utils";
import sendMail from "emails";
import InvalidDomain from "emails/InvalidDomain";
import ProjectDeleted from "emails/ProjectDeleted";
+import { log } from "@/lib/cron/utils";
+import { removeDomain } from "@/lib/domains";
+import { deleteProject, redis } from "@/lib/upstash";
export const handleDomainUpdates = async (
projectSlug: string,
diff --git a/lib/cron/usage.tsx b/lib/cron/usage.tsx
index e2376b62f9..952a506e69 100644
--- a/lib/cron/usage.tsx
+++ b/lib/cron/usage.tsx
@@ -1,8 +1,8 @@
+import sendMail from "emails";
+import UsageExceeded from "emails/UsageExceeded";
import prisma from "@/lib/prisma";
import { getUsage } from "@/lib/upstash";
import { log } from "./utils";
-import sendMail from "emails";
-import UsageExceeded from "emails/UsageExceeded";
export const updateUsage = async () => {
const users = await prisma.user.findMany({
diff --git a/lib/hooks/use-scroll.ts b/lib/hooks/use-scroll.ts
index 1328fa745a..3c8014e31d 100644
--- a/lib/hooks/use-scroll.ts
+++ b/lib/hooks/use-scroll.ts
@@ -1,4 +1,4 @@
-import { useState, useEffect, useCallback } from "react";
+import { useCallback, useEffect, useState } from "react";
export default function useScroll(threshold: number) {
const [scrolled, setScrolled] = useState(false);
diff --git a/lib/middleware/app.ts b/lib/middleware/app.ts
index d9d4f4d31a..9ac4bad14c 100644
--- a/lib/middleware/app.ts
+++ b/lib/middleware/app.ts
@@ -1,6 +1,6 @@
import { NextRequest, NextResponse } from "next/server";
-import { parse } from "@/lib/middleware/utils";
import { getToken } from "next-auth/jwt";
+import { parse } from "@/lib/middleware/utils";
export default async function AppMiddleware(req: NextRequest) {
const { path } = parse(req);
diff --git a/lib/middleware/link.ts b/lib/middleware/link.ts
index fca5a01714..78b9890994 100644
--- a/lib/middleware/link.ts
+++ b/lib/middleware/link.ts
@@ -1,6 +1,6 @@
-import { NextRequest, NextFetchEvent, NextResponse } from "next/server";
-import { redis, recordClick } from "@/lib/upstash";
-import { parse, detectBot } from "@/lib/middleware/utils";
+import { NextFetchEvent, NextRequest, NextResponse } from "next/server";
+import { detectBot, parse } from "@/lib/middleware/utils";
+import { recordClick, redis } from "@/lib/upstash";
import { LinkProps } from "../types";
export default async function LinkMiddleware(
diff --git a/lib/middleware/root.ts b/lib/middleware/root.ts
index 92cf88392e..68742d03de 100644
--- a/lib/middleware/root.ts
+++ b/lib/middleware/root.ts
@@ -1,4 +1,4 @@
-import { NextRequest, NextFetchEvent, NextResponse } from "next/server";
+import { NextFetchEvent, NextRequest, NextResponse } from "next/server";
import { recordClick, redis } from "@/lib/upstash";
import { parse } from "./utils";
diff --git a/lib/stripe/client.ts b/lib/stripe/client.ts
index 83039b6425..6a0000a6f8 100644
--- a/lib/stripe/client.ts
+++ b/lib/stripe/client.ts
@@ -1,5 +1,5 @@
// Stripe Client SDK
-import { loadStripe, Stripe as StripeProps } from "@stripe/stripe-js";
+import { Stripe as StripeProps, loadStripe } from "@stripe/stripe-js";
let stripePromise: Promise<StripeProps | null>;
diff --git a/lib/swr/use-project.ts b/lib/swr/use-project.ts
index 31569b19a0..4fcf68fafb 100644
--- a/lib/swr/use-project.ts
+++ b/lib/swr/use-project.ts
@@ -1,8 +1,8 @@
-import useSWR from "swr";
-import { useMemo } from "react";
-import { fetcher } from "@/lib/utils";
import { useRouter } from "next/router";
+import { useMemo } from "react";
+import useSWR from "swr";
import { ProjectProps } from "@/lib/types";
+import { fetcher } from "@/lib/utils";
export default function useProject() {
const router = useRouter();
diff --git a/lib/swr/use-usage.ts b/lib/swr/use-usage.ts
index 321b02cf4b..c31a093535 100644
--- a/lib/swr/use-usage.ts
+++ b/lib/swr/use-usage.ts
@@ -1,9 +1,9 @@
-import useSWR from "swr";
-import { useMemo } from "react";
import { useRouter } from "next/router";
-import { fetcher } from "@/lib/utils";
-import { UsageProps } from "@/lib/types";
+import { useMemo } from "react";
+import useSWR from "swr";
import { getPlanFromUsageLimit } from "@/lib/stripe/constants";
+import { UsageProps } from "@/lib/types";
+import { fetcher } from "@/lib/utils";
export default function useUsage() {
const router = useRouter();
diff --git a/lib/upstash.ts b/lib/upstash.ts
index da04a801a0..552bc7d223 100644
--- a/lib/upstash.ts
+++ b/lib/upstash.ts
@@ -1,8 +1,8 @@
-import { Redis } from "@upstash/redis";
import { NextRequest, userAgent } from "next/server";
+import { Redis } from "@upstash/redis";
+import { customAlphabet } from "nanoid";
import { LOCALHOST_GEO_DATA, RESERVED_KEYS } from "@/lib/constants";
import { LinkProps, ProjectProps } from "@/lib/types";
-import { customAlphabet } from "nanoid";
import {
getDescriptionFromUrl,
getFirstAndLastDay,
diff --git a/middleware.ts b/middleware.ts
index 3fdf6d758d..e4494a5e7e 100644
--- a/middleware.ts
+++ b/middleware.ts
@@ -1,15 +1,15 @@
-import { NextRequest, NextFetchEvent, NextResponse } from "next/server";
+import { NextFetchEvent, NextRequest, NextResponse } from "next/server";
+import {
+ DEFAULT_REDIRECTS,
+ HOME_HOSTNAMES,
+ RESERVED_KEYS,
+} from "@/lib/constants";
import {
AppMiddleware,
LinkMiddleware,
RootMiddleware,
} from "@/lib/middleware";
import { parse } from "@/lib/middleware/utils";
-import {
- HOME_HOSTNAMES,
- RESERVED_KEYS,
- DEFAULT_REDIRECTS,
-} from "@/lib/constants";
export const config = {
matcher: [
diff --git a/package.json b/package.json
index 93321b4dd4..ac12867a8f 100644
--- a/package.json
+++ b/package.json
@@ -58,6 +58,7 @@
},
"devDependencies": {
"@tailwindcss/line-clamp": "^0.4.2",
+ "@trivago/prettier-plugin-sort-imports": "^3.3.0",
"@types/ms": "^0.7.31",
"@types/node": "17.0.35",
"@types/react": "18.0.9",
@@ -65,7 +66,8 @@
"@types/topojson-client": "^3.1.1",
"autoprefixer": "^10.4.7",
"postcss": "^8.4.14",
+ "prettier": "^2.7.1",
"tailwindcss": "^3.1.2",
- "typescript": "4.7.2"
+ "typescript": "^4.8.4"
}
}
diff --git a/pages/_app.tsx b/pages/_app.tsx
index 66f6d1ffd9..9faaece73f 100644
--- a/pages/_app.tsx
+++ b/pages/_app.tsx
@@ -1,8 +1,8 @@
-import PlausibleProvider from "next-plausible";
-import { SessionProvider } from "next-auth/react";
+import type { AppProps } from "next/app";
import type { Session } from "next-auth";
+import { SessionProvider } from "next-auth/react";
+import PlausibleProvider from "next-plausible";
import "@/styles/globals.css";
-import type { AppProps } from "next/app";
function MyApp({
Component,
diff --git a/pages/_document.tsx b/pages/_document.tsx
index d542878db3..a18b159a00 100644
--- a/pages/_document.tsx
+++ b/pages/_document.tsx
@@ -1,4 +1,4 @@
-import { Html, Head, Main, NextScript } from "next/document";
+import { Head, Html, Main, NextScript } from "next/document";
export default function Document() {
return (
diff --git a/pages/about.tsx b/pages/about.tsx
index 8a1485d4f2..f1d8d00a23 100644
--- a/pages/about.tsx
+++ b/pages/about.tsx
@@ -1,6 +1,6 @@
+import Globe from "@/components/home/globe";
import HomeLayout from "@/components/layout/home";
import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
-import Globe from "@/components/home/globe";
export default function About() {
return (
diff --git a/pages/api/auth/[...nextauth].tsx b/pages/api/auth/[...nextauth].tsx
index 28a04e7294..1e853e39d4 100644
--- a/pages/api/auth/[...nextauth].tsx
+++ b/pages/api/auth/[...nextauth].tsx
@@ -1,10 +1,10 @@
-import NextAuth, { type NextAuthOptions } from "next-auth";
-import EmailProvider from "next-auth/providers/email";
import { PrismaAdapter } from "@next-auth/prisma-adapter";
-import prisma from "@/lib/prisma";
import sendMail, { sendMarketingMail } from "emails";
import LoginLink from "emails/LoginLink";
import WelcomeEmail from "emails/WelcomeEmail";
+import NextAuth, { type NextAuthOptions } from "next-auth";
+import EmailProvider from "next-auth/providers/email";
+import prisma from "@/lib/prisma";
const VERCEL_DEPLOYMENT = !!process.env.VERCEL_URL;
diff --git a/pages/api/cron/domains.ts b/pages/api/cron/domains.ts
index 5b91c9213d..d5199446ae 100644
--- a/pages/api/cron/domains.ts
+++ b/pages/api/cron/domains.ts
@@ -1,12 +1,12 @@
import type { NextApiRequest, NextApiResponse } from "next";
import { verifySignature } from "@upstash/qstash/nextjs";
-import prisma from "@/lib/prisma";
+import { handleDomainUpdates } from "@/lib/cron/domains";
import {
getConfigResponse,
getDomainResponse,
verifyDomain,
} from "@/lib/domains";
-import { handleDomainUpdates } from "@/lib/cron/domains";
+import prisma from "@/lib/prisma";
/**
* Cron to check if domains are verified.
diff --git a/pages/api/cron/links.ts b/pages/api/cron/links.ts
index 4eef8fb508..d4e8059482 100644
--- a/pages/api/cron/links.ts
+++ b/pages/api/cron/links.ts
@@ -1,7 +1,7 @@
import type { NextApiRequest, NextApiResponse } from "next";
import { verifySignature } from "@upstash/qstash/nextjs";
-import { redis } from "@/lib/upstash";
import { log } from "@/lib/cron/utils";
+import { redis } from "@/lib/upstash";
/**
* Cron to delete generic links (links created on dub.sh) that are older than 30 days.
diff --git a/pages/api/edge/coordinates.ts b/pages/api/edge/coordinates.ts
index 183ad20502..e17142c1f1 100644
--- a/pages/api/edge/coordinates.ts
+++ b/pages/api/edge/coordinates.ts
@@ -1,6 +1,6 @@
import type { NextRequest } from "next/server";
-import { redis } from "@/lib/upstash";
import { RawStatsProps } from "@/lib/stats";
+import { redis } from "@/lib/upstash";
export const config = {
runtime: "experimental-edge",
diff --git a/pages/api/edge/links/[key]/stats.ts b/pages/api/edge/links/[key]/stats.ts
index b04fcd272d..1a58c43c8c 100644
--- a/pages/api/edge/links/[key]/stats.ts
+++ b/pages/api/edge/links/[key]/stats.ts
@@ -1,11 +1,11 @@
import type { NextRequest } from "next/server";
-import { redis } from "@/lib/upstash";
import {
IntervalProps,
- processData,
- intervalData,
RawStatsProps,
+ intervalData,
+ processData,
} from "@/lib/stats";
+import { redis } from "@/lib/upstash";
export const config = {
runtime: "experimental-edge",
diff --git a/pages/api/links/[key].ts b/pages/api/links/[key].ts
index 56f924cff9..9ac0bca9cc 100644
--- a/pages/api/links/[key].ts
+++ b/pages/api/links/[key].ts
@@ -1,6 +1,6 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { redis, editLink, deleteLink } from "@/lib/upstash";
import { getSession } from "@/lib/auth";
+import { deleteLink, editLink, redis } from "@/lib/upstash";
export default async function handler(
req: NextApiRequest,
diff --git a/pages/api/links/index.ts b/pages/api/links/index.ts
index 5571251aaf..06cbc10137 100644
--- a/pages/api/links/index.ts
+++ b/pages/api/links/index.ts
@@ -1,6 +1,6 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getLinksForProject, addLink } from "@/lib/upstash";
import { getSession } from "@/lib/auth";
+import { addLink, getLinksForProject } from "@/lib/upstash";
// This is a special route for creating custom dub.sh links.
diff --git a/pages/api/projects/[slug]/domains/[domain]/index.ts b/pages/api/projects/[slug]/domains/[domain]/index.ts
index 8ebaf7a7f4..f8644ff86b 100644
--- a/pages/api/projects/[slug]/domains/[domain]/index.ts
+++ b/pages/api/projects/[slug]/domains/[domain]/index.ts
@@ -1,9 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
-import prisma from "@/lib/prisma";
import { withProjectAuth } from "@/lib/auth";
+import { addDomain, removeDomain } from "@/lib/domains";
+import prisma from "@/lib/prisma";
import { changeDomain } from "@/lib/upstash";
import { validDomainRegex } from "@/lib/utils";
-import { addDomain, removeDomain } from "@/lib/domains";
export default withProjectAuth(
async (req: NextApiRequest, res: NextApiResponse) => {
diff --git a/pages/api/projects/[slug]/domains/[domain]/links/[key]/exists.ts b/pages/api/projects/[slug]/domains/[domain]/links/[key]/exists.ts
index fea3bbf0ef..c0a38aae58 100644
--- a/pages/api/projects/[slug]/domains/[domain]/links/[key]/exists.ts
+++ b/pages/api/projects/[slug]/domains/[domain]/links/[key]/exists.ts
@@ -1,6 +1,6 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { checkIfKeyExists } from "@/lib/upstash";
import { withProjectAuth } from "@/lib/auth";
+import { checkIfKeyExists } from "@/lib/upstash";
export default withProjectAuth(
async (req: NextApiRequest, res: NextApiResponse) => {
diff --git a/pages/api/projects/[slug]/domains/[domain]/links/[key]/index.ts b/pages/api/projects/[slug]/domains/[domain]/links/[key]/index.ts
index 57bfc1a1c5..5f4ee14fb5 100644
--- a/pages/api/projects/[slug]/domains/[domain]/links/[key]/index.ts
+++ b/pages/api/projects/[slug]/domains/[domain]/links/[key]/index.ts
@@ -1,7 +1,7 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { editLink, deleteLink } from "@/lib/upstash";
-import { withProjectAuth } from "@/lib/auth";
import cloudinary from "cloudinary";
+import { withProjectAuth } from "@/lib/auth";
+import { deleteLink, editLink } from "@/lib/upstash";
export default withProjectAuth(
async (req: NextApiRequest, res: NextApiResponse) => {
diff --git a/pages/api/projects/[slug]/domains/[domain]/links/[key]/stats.ts b/pages/api/projects/[slug]/domains/[domain]/links/[key]/stats.ts
index b396ab7b37..167c75126e 100644
--- a/pages/api/projects/[slug]/domains/[domain]/links/[key]/stats.ts
+++ b/pages/api/projects/[slug]/domains/[domain]/links/[key]/stats.ts
@@ -1,12 +1,12 @@
import { NextApiRequest, NextApiResponse } from "next";
import { withProjectAuth } from "@/lib/auth";
-import { redis } from "@/lib/upstash";
import {
IntervalProps,
- intervalData,
RawStatsProps,
+ intervalData,
processData,
} from "@/lib/stats";
+import { redis } from "@/lib/upstash";
export default withProjectAuth(
async (req: NextApiRequest, res: NextApiResponse) => {
diff --git a/pages/api/projects/[slug]/domains/[domain]/links/count.ts b/pages/api/projects/[slug]/domains/[domain]/links/count.ts
index 38a27aea99..2776894654 100644
--- a/pages/api/projects/[slug]/domains/[domain]/links/count.ts
+++ b/pages/api/projects/[slug]/domains/[domain]/links/count.ts
@@ -1,6 +1,6 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getLinkCountForProject } from "@/lib/upstash";
import { withProjectAuth } from "@/lib/auth";
+import { getLinkCountForProject } from "@/lib/upstash";
export default withProjectAuth(
async (req: NextApiRequest, res: NextApiResponse) => {
diff --git a/pages/api/projects/[slug]/domains/[domain]/links/index.ts b/pages/api/projects/[slug]/domains/[domain]/links/index.ts
index 0f40c1464b..a768b0c0fd 100644
--- a/pages/api/projects/[slug]/domains/[domain]/links/index.ts
+++ b/pages/api/projects/[slug]/domains/[domain]/links/index.ts
@@ -1,7 +1,7 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { addLink, getLinksForProject } from "@/lib/upstash";
-import { withProjectAuth } from "@/lib/auth";
import cloudinary from "cloudinary";
+import { withProjectAuth } from "@/lib/auth";
+import { addLink, getLinksForProject } from "@/lib/upstash";
export default withProjectAuth(
async (req: NextApiRequest, res: NextApiResponse) => {
diff --git a/pages/api/projects/[slug]/domains/[domain]/links/random.ts b/pages/api/projects/[slug]/domains/[domain]/links/random.ts
index 2c5fe137d0..7a959f98db 100644
--- a/pages/api/projects/[slug]/domains/[domain]/links/random.ts
+++ b/pages/api/projects/[slug]/domains/[domain]/links/random.ts
@@ -1,6 +1,6 @@
import { NextApiRequest, NextApiResponse } from "next";
-import { getRandomKey } from "@/lib/upstash";
import { withProjectAuth } from "@/lib/auth";
+import { getRandomKey } from "@/lib/upstash";
export default withProjectAuth(
async (req: NextApiRequest, res: NextApiResponse) => {
diff --git a/pages/api/projects/[slug]/domains/[domain]/verify.ts b/pages/api/projects/[slug]/domains/[domain]/verify.ts
index c94e9f44d3..26fcc33a11 100644
--- a/pages/api/projects/[slug]/domains/[domain]/verify.ts
+++ b/pages/api/projects/[slug]/domains/[domain]/verify.ts
@@ -1,12 +1,12 @@
-import { withProjectAuth } from "@/lib/auth";
import { NextApiRequest, NextApiResponse } from "next";
-import { DomainVerificationStatusProps } from "@/lib/types";
-import prisma from "@/lib/prisma";
+import { withProjectAuth } from "@/lib/auth";
import {
getConfigResponse,
getDomainResponse,
verifyDomain,
} from "@/lib/domains";
+import prisma from "@/lib/prisma";
+import { DomainVerificationStatusProps } from "@/lib/types";
export default withProjectAuth(
async (req: NextApiRequest, res: NextApiResponse) => {
diff --git a/pages/api/projects/[slug]/exists.ts b/pages/api/projects/[slug]/exists.ts
index 146d1597b2..32de38fb2d 100644
--- a/pages/api/projects/[slug]/exists.ts
+++ b/pages/api/projects/[slug]/exists.ts
@@ -1,7 +1,7 @@
import { NextApiRequest, NextApiResponse } from "next";
import { getSession } from "@/lib/auth";
+import { DEFAULT_REDIRECTS, RESERVED_KEYS } from "@/lib/constants";
import prisma from "@/lib/prisma";
-import { RESERVED_KEYS, DEFAULT_REDIRECTS } from "@/lib/constants";
export default async function handler(
req: NextApiRequest,
diff --git a/pages/api/projects/[slug]/index.ts b/pages/api/projects/[slug]/index.ts
index e212850447..62a9947755 100644
--- a/pages/api/projects/[slug]/index.ts
+++ b/pages/api/projects/[slug]/index.ts
@@ -1,9 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
import { withProjectAuth } from "@/lib/auth";
-import prisma from "@/lib/prisma";
import { removeDomain } from "@/lib/domains";
-import { deleteProject } from "@/lib/upstash";
+import prisma from "@/lib/prisma";
import { ProjectProps } from "@/lib/types";
+import { deleteProject } from "@/lib/upstash";
export default withProjectAuth(
async (req: NextApiRequest, res: NextApiResponse, project: ProjectProps) => {
diff --git a/pages/api/projects/index.ts b/pages/api/projects/index.ts
index 353c3536f1..3d23d5918a 100644
--- a/pages/api/projects/index.ts
+++ b/pages/api/projects/index.ts
@@ -1,9 +1,9 @@
import { NextApiRequest, NextApiResponse } from "next";
import { getSession, withUserAuth } from "@/lib/auth";
+import { DEFAULT_REDIRECTS, RESERVED_KEYS } from "@/lib/constants";
+import { addDomain, removeDomain } from "@/lib/domains";
import prisma from "@/lib/prisma";
import { validDomainRegex } from "@/lib/utils";
-import { addDomain, removeDomain } from "@/lib/domains";
-import { RESERVED_KEYS, DEFAULT_REDIRECTS } from "@/lib/constants";
export default withUserAuth(
async (req: NextApiRequest, res: NextApiResponse, userId: string) => {
diff --git a/pages/api/stripe/webhook.ts b/pages/api/stripe/webhook.ts
index c72312c3f2..0f23ca18fc 100644
--- a/pages/api/stripe/webhook.ts
+++ b/pages/api/stripe/webhook.ts
@@ -1,8 +1,8 @@
import { NextApiRequest, NextApiResponse } from "next";
-import Stripe from "stripe";
-import { stripe } from "@/lib/stripe";
import { Readable } from "node:stream";
+import Stripe from "stripe";
import prisma from "@/lib/prisma";
+import { stripe } from "@/lib/stripe";
import { PRO_TIERS } from "@/lib/stripe/constants";
// Stripe requires the raw body to construct the event.
diff --git a/pages/app/[slug]/[key].tsx b/pages/app/[slug]/[key].tsx
index 1d45a18fd1..c242607b5f 100644
--- a/pages/app/[slug]/[key].tsx
+++ b/pages/app/[slug]/[key].tsx
@@ -1,11 +1,11 @@
+import ErrorPage from "next/error";
import Link from "next/link";
-import Stats from "@/components/stats";
+import AppLayout from "@/components/layout/app";
import BlurImage from "@/components/shared/blur-image";
-import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
import { Lock } from "@/components/shared/icons";
-import AppLayout from "@/components/layout/app";
+import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
+import Stats from "@/components/stats";
import useProject from "@/lib/swr/use-project";
-import ErrorPage from "next/error";
import useUsage from "@/lib/swr/use-usage";
export default function StatsPage() {
diff --git a/pages/app/[slug]/index.tsx b/pages/app/[slug]/index.tsx
index e06723f85e..2eac265630 100644
--- a/pages/app/[slug]/index.tsx
+++ b/pages/app/[slug]/index.tsx
@@ -1,9 +1,9 @@
+import ErrorPage from "next/error";
+import LinksContainer from "@/components/app/links-container";
+import { useAddEditLinkModal } from "@/components/app/modals/add-edit-link-modal";
+import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
import AppLayout from "components/layout/app";
import useProject from "@/lib/swr/use-project";
-import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
-import { useAddEditLinkModal } from "@/components/app/modals/add-edit-link-modal";
-import LinksContainer from "@/components/app/links-container";
-import ErrorPage from "next/error";
export default function ProjectLinks() {
const { project, error } = useProject();
diff --git a/pages/app/[slug]/settings.tsx b/pages/app/[slug]/settings.tsx
index cb0650234e..c819cbbf16 100644
--- a/pages/app/[slug]/settings.tsx
+++ b/pages/app/[slug]/settings.tsx
@@ -1,10 +1,10 @@
-import AppLayout from "components/layout/app";
-import useProject from "@/lib/swr/use-project";
-import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
-import CustomDomain from "@/components/app/settings/custom-domain";
-import DefaultPage from "@/components/app/settings/landing-page";
import ErrorPage from "next/error";
+import CustomDomain from "@/components/app/settings/custom-domain";
import DeleteProject from "@/components/app/settings/delete-project";
+import DefaultPage from "@/components/app/settings/landing-page";
+import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
+import AppLayout from "components/layout/app";
+import useProject from "@/lib/swr/use-project";
export default function ProjectLinks() {
const { error } = useProject();
diff --git a/pages/app/index.tsx b/pages/app/index.tsx
index 03720582e0..463b7b57d8 100644
--- a/pages/app/index.tsx
+++ b/pages/app/index.tsx
@@ -1,15 +1,15 @@
-import AppLayout from "components/layout/app";
-import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
import useSWR from "swr";
-import { fetcher } from "@/lib/utils";
-import { ProjectProps } from "@/lib/types";
-import ProjectCard from "@/components/app/project-card";
import { useAddProjectModal } from "@/components/app/modals/add-project-modal";
import NoProjectsPlaceholder from "@/components/app/no-projects-placeholder";
+import ProjectCard from "@/components/app/project-card";
import ProjectCardPlaceholder from "@/components/app/project-card-placeholder";
-import useUsage from "@/lib/swr/use-usage";
+import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
import Tooltip, { TooltipContent } from "@/components/shared/tooltip";
+import AppLayout from "components/layout/app";
import { FREE_PLAN_PROJECT_LIMIT } from "@/lib/constants";
+import useUsage from "@/lib/swr/use-usage";
+import { ProjectProps } from "@/lib/types";
+import { fetcher } from "@/lib/utils";
export default function App() {
const { data } = useSWR<ProjectProps[]>(`/api/projects`, fetcher);
diff --git a/pages/app/links/[key].tsx b/pages/app/links/[key].tsx
index 4a00f1bdbd..b3924cedd6 100644
--- a/pages/app/links/[key].tsx
+++ b/pages/app/links/[key].tsx
@@ -1,5 +1,5 @@
-import Stats from "@/components/stats";
import AppLayout from "@/components/layout/app";
+import Stats from "@/components/stats";
export default function StatsPage() {
return (
diff --git a/pages/app/links/index.tsx b/pages/app/links/index.tsx
index 2710be64f2..4e3a05dd8a 100644
--- a/pages/app/links/index.tsx
+++ b/pages/app/links/index.tsx
@@ -1,7 +1,7 @@
-import AppLayout from "components/layout/app";
-import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
-import { useAddEditLinkModal } from "@/components/app/modals/add-edit-link-modal";
import LinksContainer from "@/components/app/links-container";
+import { useAddEditLinkModal } from "@/components/app/modals/add-edit-link-modal";
+import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
+import AppLayout from "components/layout/app";
export default function Links() {
const { AddEditLinkModal, AddEditLinkButton } = useAddEditLinkModal({});
diff --git a/pages/app/login.tsx b/pages/app/login.tsx
index 30c5012165..801d8e7389 100644
--- a/pages/app/login.tsx
+++ b/pages/app/login.tsx
@@ -1,8 +1,8 @@
-import { useState } from "react";
import Link from "next/link";
+import { useState } from "react";
import { signIn } from "next-auth/react";
-import { LoadingDots } from "@/components/shared/icons";
import Meta from "@/components/layout/meta";
+import { LoadingDots } from "@/components/shared/icons";
export default function Login() {
const [signInClicked, setSignInClicked] = useState(false);
diff --git a/pages/app/register.tsx b/pages/app/register.tsx
index 6cc9374e40..86654c469f 100644
--- a/pages/app/register.tsx
+++ b/pages/app/register.tsx
@@ -1,8 +1,8 @@
-import { useState } from "react";
import Link from "next/link";
+import { useState } from "react";
import { signIn } from "next-auth/react";
-import { LoadingDots } from "@/components/shared/icons";
import Meta from "@/components/layout/meta";
+import { LoadingDots } from "@/components/shared/icons";
export default function Login() {
const [signInClicked, setSignInClicked] = useState(false);
diff --git a/pages/app/settings.tsx b/pages/app/settings.tsx
index 518b6d8d89..41faa2a319 100644
--- a/pages/app/settings.tsx
+++ b/pages/app/settings.tsx
@@ -1,6 +1,6 @@
-import AppLayout from "components/layout/app";
-import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
import PlanUsage from "@/components/app/settings/plan-usage";
+import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
+import AppLayout from "components/layout/app";
export default function Settings() {
return (
diff --git a/pages/index.tsx b/pages/index.tsx
index 288dfc35fa..999e76ff3d 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -1,12 +1,12 @@
-import HomeLayout from "@/components/layout/home";
-import { useCallback, useEffect } from "react";
import { useRouter } from "next/router";
+import { useCallback, useEffect } from "react";
import { useStatsModal } from "@/components/app/modals/stats-modal";
-import Hero from "@/components/home/hero";
import Demo from "@/components/home/demo";
-import Globe from "@/components/home/globe";
import Features from "@/components/home/features";
+import Globe from "@/components/home/globe";
+import Hero from "@/components/home/hero";
import Pricing from "@/components/home/pricing";
+import HomeLayout from "@/components/layout/home";
export default function Home({ stars }: { stars: number }) {
const router = useRouter();
diff --git a/pages/placeholder/[[...domain]].tsx b/pages/placeholder/[[...domain]].tsx
index ee30321da1..f7758241a4 100644
--- a/pages/placeholder/[[...domain]].tsx
+++ b/pages/placeholder/[[...domain]].tsx
@@ -1,8 +1,8 @@
+import { GetStaticProps } from "next";
+import { ParsedUrlQuery } from "querystring";
+import Globe from "@/components/home/globe";
import HomeLayout from "@/components/layout/home";
import MaxWidthWrapper from "@/components/shared/max-width-wrapper";
-import Globe from "@/components/home/globe";
-import { ParsedUrlQuery } from "querystring";
-import { GetStaticProps } from "next";
export default function Placeholder({ domain }: { domain: string }) {
return (
diff --git a/pages/proxy/[domain]/[key].tsx b/pages/proxy/[domain]/[key].tsx
index 2b86796326..12384aa126 100644
--- a/pages/proxy/[domain]/[key].tsx
+++ b/pages/proxy/[domain]/[key].tsx
@@ -1,9 +1,9 @@
-import { redis } from "@/lib/upstash";
-import prisma from "@/lib/prisma";
-import { LinkProps } from "@/lib/types";
+import Image from "next/future/image";
import Head from "next/head";
import { escape } from "html-escaper";
-import Image from "next/future/image";
+import prisma from "@/lib/prisma";
+import { LinkProps } from "@/lib/types";
+import { redis } from "@/lib/upstash";
export default function LinkPage({ url, title, description, image, logo }) {
return (
diff --git a/pages/stats/[key].tsx b/pages/stats/[key].tsx
index 9d31075b2e..b1cba3a68e 100644
--- a/pages/stats/[key].tsx
+++ b/pages/stats/[key].tsx
@@ -1,5 +1,5 @@
-import Stats from "@/components/stats";
import HomeLayout from "@/components/layout/home";
+import Stats from "@/components/stats";
export default function StatsPage() {
return (
diff --git a/postcss.config.js b/postcss.config.js
index 33ad091d26..12a703d900 100644
--- a/postcss.config.js
+++ b/postcss.config.js
@@ -3,4 +3,4 @@ module.exports = {
tailwindcss: {},
autoprefixer: {},
},
-}
+};
diff --git a/yarn.lock b/yarn.lock
index c776404678..7168155d3a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,6 +2,173 @@
# yarn lockfile v1
+"@ampproject/remapping@^2.1.0":
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d"
+ integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==
+ dependencies:
+ "@jridgewell/gen-mapping" "^0.1.0"
+ "@jridgewell/trace-mapping" "^0.3.9"
+
+"@babel/code-frame@^7.16.7", "@babel/code-frame@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a"
+ integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==
+ dependencies:
+ "@babel/highlight" "^7.18.6"
+
+"@babel/compat-data@^7.19.3":
+ version "7.19.4"
+ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.19.4.tgz#95c86de137bf0317f3a570e1b6e996b427299747"
+ integrity sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw==
+
+ version "7.17.8"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.8.tgz#3dac27c190ebc3a4381110d46c80e77efe172e1a"
+ integrity sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==
+ dependencies:
+ "@ampproject/remapping" "^2.1.0"
+ "@babel/code-frame" "^7.16.7"
+ "@babel/generator" "^7.17.7"
+ "@babel/helper-compilation-targets" "^7.17.7"
+ "@babel/helper-module-transforms" "^7.17.7"
+ "@babel/helpers" "^7.17.8"
+ "@babel/parser" "^7.17.8"
+ "@babel/template" "^7.16.7"
+ "@babel/traverse" "^7.17.3"
+ "@babel/types" "^7.17.0"
+ convert-source-map "^1.7.0"
+ debug "^4.1.0"
+ gensync "^1.0.0-beta.2"
+ json5 "^2.1.2"
+ semver "^6.3.0"
+
+ version "7.17.7"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.7.tgz#8da2599beb4a86194a3b24df6c085931d9ee45ad"
+ integrity sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==
+ dependencies:
+ "@babel/types" "^7.17.0"
+ jsesc "^2.5.1"
+ source-map "^0.5.0"
+
+"@babel/generator@^7.17.3", "@babel/generator@^7.17.7", "@babel/generator@^7.19.4":
+ version "7.19.5"
+ resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.19.5.tgz#da3f4b301c8086717eee9cab14da91b1fa5dcca7"
+ integrity sha512-DxbNz9Lz4aMZ99qPpO1raTbcrI1ZeYh+9NR9qhfkQIbFtVEqotHojEBxHzmxhVONkGt6VyrqVQcgpefMy9pqcg==
+ dependencies:
+ "@babel/types" "^7.19.4"
+ "@jridgewell/gen-mapping" "^0.3.2"
+ jsesc "^2.5.1"
+
+"@babel/helper-compilation-targets@^7.17.7":
+ version "7.19.3"
+ resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz#a10a04588125675d7c7ae299af86fa1b2ee038ca"
+ integrity sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg==
+ dependencies:
+ "@babel/compat-data" "^7.19.3"
+ "@babel/helper-validator-option" "^7.18.6"
+ browserslist "^4.21.3"
+ semver "^6.3.0"
+
+"@babel/helper-environment-visitor@^7.16.7", "@babel/helper-environment-visitor@^7.18.9":
+ version "7.18.9"
+ resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be"
+ integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==
+
+"@babel/helper-function-name@^7.16.7", "@babel/helper-function-name@^7.19.0":
+ version "7.19.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz#941574ed5390682e872e52d3f38ce9d1bef4648c"
+ integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==
+ dependencies:
+ "@babel/template" "^7.18.10"
+ "@babel/types" "^7.19.0"
+
+"@babel/helper-hoist-variables@^7.16.7", "@babel/helper-hoist-variables@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678"
+ integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==
+ dependencies:
+ "@babel/types" "^7.18.6"
+
+"@babel/helper-module-imports@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e"
+ integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==
+ dependencies:
+ "@babel/types" "^7.18.6"
+
+"@babel/helper-module-transforms@^7.17.7":
+ version "7.19.0"
+ resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz#309b230f04e22c58c6a2c0c0c7e50b216d350c30"
+ integrity sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ==
+ dependencies:
+ "@babel/helper-environment-visitor" "^7.18.9"
+ "@babel/helper-module-imports" "^7.18.6"
+ "@babel/helper-simple-access" "^7.18.6"
+ "@babel/helper-split-export-declaration" "^7.18.6"
+ "@babel/helper-validator-identifier" "^7.18.6"
+ "@babel/template" "^7.18.10"
+ "@babel/traverse" "^7.19.0"
+ "@babel/types" "^7.19.0"
+
+"@babel/helper-simple-access@^7.18.6":
+ version "7.19.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.19.4.tgz#be553f4951ac6352df2567f7daa19a0ee15668e7"
+ integrity sha512-f9Xq6WqBFqaDfbCzn2w85hwklswz5qsKlh7f08w4Y9yhJHpnNC0QemtSkK5YyOY8kPGvyiwdzZksGUhnGdaUIg==
+ dependencies:
+ "@babel/types" "^7.19.4"
+
+"@babel/helper-split-export-declaration@^7.16.7", "@babel/helper-split-export-declaration@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075"
+ integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==
+ dependencies:
+ "@babel/types" "^7.18.6"
+
+"@babel/helper-string-parser@^7.19.4":
+ version "7.19.4"
+ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz#38d3acb654b4701a9b77fb0615a96f775c3a9e63"
+ integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==
+
+"@babel/helper-validator-identifier@^7.16.7", "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1":
+ version "7.19.1"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz#7eea834cf32901ffdc1a7ee555e2f9c27e249ca2"
+ integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==
+
+"@babel/helper-validator-option@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8"
+ integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==
+
+"@babel/helpers@^7.17.8":
+ version "7.19.4"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.19.4.tgz#42154945f87b8148df7203a25c31ba9a73be46c5"
+ integrity sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw==
+ dependencies:
+ "@babel/template" "^7.18.10"
+ "@babel/traverse" "^7.19.4"
+ "@babel/types" "^7.19.4"
+
+"@babel/highlight@^7.18.6":
+ version "7.18.6"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf"
+ integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==
+ dependencies:
+ "@babel/helper-validator-identifier" "^7.18.6"
+ chalk "^2.0.0"
+ js-tokens "^4.0.0"
+
+ version "7.17.8"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.8.tgz#2817fb9d885dd8132ea0f8eb615a6388cca1c240"
+ integrity sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==
+
+"@babel/parser@^7.17.3", "@babel/parser@^7.17.8", "@babel/parser@^7.18.10", "@babel/parser@^7.19.4":
+ version "7.19.4"
+ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.4.tgz#03c4339d2b8971eb3beca5252bafd9b9f79db3dc"
+ integrity sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA==
+
"@babel/parser@^7.18.11":
version "7.19.3"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.19.3.tgz#8dd36d17c53ff347f9e55c328710321b49479a9a"
@@ -21,6 +188,64 @@
dependencies:
regenerator-runtime "^0.13.4"
+"@babel/template@^7.16.7", "@babel/template@^7.18.10":
+ version "7.18.10"
+ resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71"
+ integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==
+ dependencies:
+ "@babel/code-frame" "^7.18.6"
+ "@babel/parser" "^7.18.10"
+ "@babel/types" "^7.18.10"
+
+ version "7.17.3"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.3.tgz#0ae0f15b27d9a92ba1f2263358ea7c4e7db47b57"
+ integrity sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==
+ dependencies:
+ "@babel/code-frame" "^7.16.7"
+ "@babel/generator" "^7.17.3"
+ "@babel/helper-environment-visitor" "^7.16.7"
+ "@babel/helper-function-name" "^7.16.7"
+ "@babel/helper-hoist-variables" "^7.16.7"
+ "@babel/helper-split-export-declaration" "^7.16.7"
+ "@babel/parser" "^7.17.3"
+ "@babel/types" "^7.17.0"
+ debug "^4.1.0"
+ globals "^11.1.0"
+
+"@babel/traverse@^7.17.3", "@babel/traverse@^7.19.0", "@babel/traverse@^7.19.4":
+ version "7.19.4"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.19.4.tgz#f117820e18b1e59448a6c1fa9d0ff08f7ac459a8"
+ integrity sha512-w3K1i+V5u2aJUOXBFFC5pveFLmtq1s3qcdDNC2qRI6WPBQIDaKFqXxDEqDO/h1dQ3HjsZoZMyIy6jGLq0xtw+g==
+ dependencies:
+ "@babel/code-frame" "^7.18.6"
+ "@babel/generator" "^7.19.4"
+ "@babel/helper-environment-visitor" "^7.18.9"
+ "@babel/helper-function-name" "^7.19.0"
+ "@babel/helper-hoist-variables" "^7.18.6"
+ "@babel/helper-split-export-declaration" "^7.18.6"
+ "@babel/parser" "^7.19.4"
+ "@babel/types" "^7.19.4"
+ debug "^4.1.0"
+ globals "^11.1.0"
+
+ version "7.17.0"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.0.tgz#a826e368bccb6b3d84acd76acad5c0d87342390b"
+ integrity sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==
+ dependencies:
+ "@babel/helper-validator-identifier" "^7.16.7"
+ to-fast-properties "^2.0.0"
+
+"@babel/types@^7.17.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.19.0", "@babel/types@^7.19.4":
+ version "7.19.4"
+ resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.19.4.tgz#0dd5c91c573a202d600490a35b33246fed8a41c7"
+ integrity sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw==
+ dependencies:
+ "@babel/helper-string-parser" "^7.19.4"
+ "@babel/helper-validator-identifier" "^7.19.1"
+ to-fast-properties "^2.0.0"
+
"@colors/[email protected]":
version "1.5.0"
resolved "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz"
@@ -88,7 +313,15 @@
resolved "https://registry.npmjs.org/@isaacs/string-locale-compare/-/string-locale-compare-1.1.0.tgz"
integrity sha512-SQ7Kzhh9+D+ZW9MA0zkYv3VXhIDNx+LzM6EJ+/65I3QY+enU6Itte7E5XX7EWrqLW2FN4n06GWzBnPoC3th2aQ==
-"@jridgewell/gen-mapping@^0.3.0":
+"@jridgewell/gen-mapping@^0.1.0":
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996"
+ integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==
+ dependencies:
+ "@jridgewell/set-array" "^1.0.0"
+ "@jridgewell/sourcemap-codec" "^1.4.10"
+
+"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2":
version "0.3.2"
resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9"
integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==
@@ -102,7 +335,7 @@
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
-"@jridgewell/set-array@^1.0.1":
+"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72"
integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==
@@ -969,6 +1202,19 @@
resolved "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz"
integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==
+"@trivago/prettier-plugin-sort-imports@^3.3.0":
+ version "3.3.0"
+ resolved "https://registry.yarnpkg.com/@trivago/prettier-plugin-sort-imports/-/prettier-plugin-sort-imports-3.3.0.tgz#ee4e9ec1d8e3076b95fcb94311f42f7a61eecd37"
+ integrity sha512-1y44bVZuIN0RsS3oIiGd5k8Vm3IZXYZnp4VsP2Z/S5L9WAOw43HE2clso66M2S/dDeJ+8sKPqnHsEfh39Vjs3w==
+ dependencies:
+ "@babel/core" "7.17.8"
+ "@babel/generator" "7.17.7"
+ "@babel/parser" "7.17.8"
+ "@babel/traverse" "7.17.3"
+ "@babel/types" "7.17.0"
+ javascript-natural-sort "0.7.1"
+ lodash "4.17.21"
+
"@types/d3-color@^1":
version "1.4.2"
resolved "https://registry.npmjs.org/@types/d3-color/-/d3-color-1.4.2.tgz"
@@ -1416,6 +1662,13 @@ ansi-regex@^5.0.1:
resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz"
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
+ansi-styles@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
+ integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
+ dependencies:
+ color-convert "^1.9.0"
+
ansi-styles@^4.0.0, ansi-styles@^4.1.0, ansi-styles@^4.3.0:
version "4.3.0"
resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz"
@@ -1690,6 +1943,15 @@ chainsaw@~0.1.0:
dependencies:
traverse ">=0.3.0 <0.4"
+chalk@^2.0.0:
+ version "2.4.2"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
+ integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
+ dependencies:
+ ansi-styles "^3.2.1"
+ escape-string-regexp "^1.0.5"
+ supports-color "^5.3.0"
+
chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2:
version "4.1.2"
resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
@@ -1869,7 +2131,7 @@ cobe@^0.6.2:
dependencies:
phenomenon "^1.6.0"
-color-convert@^1.9.3:
+color-convert@^1.9.0, color-convert@^1.9.3:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
@@ -1967,6 +2229,11 @@ console-control-strings@^1.1.0:
resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz"
integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==
+convert-source-map@^1.7.0:
+ version "1.9.0"
+ resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f"
+ integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==
+
cookie@^0.4.1:
version "0.4.2"
resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz"
@@ -2513,6 +2780,11 @@ escape-goat@^3.0.0:
resolved "https://registry.yarnpkg.com/escape-goat/-/escape-goat-3.0.0.tgz#e8b5fb658553fe8a3c4959c316c6ebb8c842b19c"
integrity sha512-w3PwNZJwRxlp47QGzhuEBldEqVHHhh8/tIPcl6ecf2Bou99cdAt0knihBV0Ecc7CGxYduXVBDheH1K2oADRlvw==
+escape-string-regexp@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+ integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==
+
escodegen@^1.8.1:
version "1.14.3"
resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.14.3.tgz"
@@ -2740,6 +3012,11 @@ gauge@^4.0.3:
strip-ansi "^6.0.1"
wide-align "^1.1.5"
+gensync@^1.0.0-beta.2:
+ version "1.0.0-beta.2"
+ resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
+ integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
+
get-caller-file@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
@@ -2803,6 +3080,11 @@ glob@^8.0.1, glob@^8.0.3:
minimatch "^5.0.1"
once "^1.3.0"
+globals@^11.1.0:
+ version "11.12.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
+ integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
+
goober@^2.1.10:
version "2.1.11"
resolved "https://registry.npmjs.org/goober/-/goober-2.1.11.tgz"
@@ -2813,6 +3095,11 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10,
resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz"
integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==
+has-flag@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
+ integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==
+
has-flag@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz"
@@ -3159,6 +3446,11 @@ isomorphic-fetch@^3.0.0:
node-fetch "^2.6.1"
whatwg-fetch "^3.4.1"
+ version "0.7.1"
+ resolved "https://registry.yarnpkg.com/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz#f9e2303d4507f6d74355a73664d1440fb5a0ef59"
+ integrity sha512-nO6jcEfZWQXDhOiBtG2KvKyEptz7RVbpGP4vTD2hLBdmNQSsCiicO2Ioinv6UI4y9ukqnBpy+XZ9H6uLNgJTlw==
+
jose@^4.1.4, jose@^4.3.7:
version "4.9.2"
resolved "https://registry.npmjs.org/jose/-/jose-4.9.2.tgz"
@@ -3174,7 +3466,7 @@ js-beautify@^1.6.14:
glob "^8.0.3"
nopt "^6.0.0"
-"js-tokens@^3.0.0 || ^4.0.0":
+"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
@@ -3211,6 +3503,11 @@ jsdom@^20.0.0:
ws "^8.9.0"
xml-name-validator "^4.0.0"
+jsesc@^2.5.1:
+ version "2.5.2"
+ resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
+ integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
+
json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1:
version "2.3.1"
resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz"
@@ -3221,6 +3518,11 @@ json-stringify-nice@^1.1.4:
resolved "https://registry.npmjs.org/json-stringify-nice/-/json-stringify-nice-1.1.4.tgz"
integrity sha512-5Z5RFW63yxReJ7vANgW6eZFGWaQvnPE3WNmZoOJrSkGju2etKA2L5rrOa1sm877TVTFt57A80BH1bArcmlLfPw==
+json5@^2.1.2:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
+ integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
+
jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz"
@@ -3404,7 +3706,7 @@ lodash.clonedeep@^4.5.0:
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==
-lodash@^4.17.15, lodash@^4.17.21:
[email protected], lodash@^4.17.15, lodash@^4.17.21:
version "4.17.21"
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
@@ -5165,6 +5467,11 @@ semver@^5.6.0:
resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
+semver@^6.3.0:
+ version "6.3.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
+ integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
+
semver@^7.0.0, semver@^7.1.1, semver@^7.3.5, semver@^7.3.7:
version "7.3.7"
resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz"
@@ -5267,6 +5574,11 @@ source-map-support@^0.5.13, source-map-support@~0.5.20:
buffer-from "^1.0.0"
source-map "^0.6.0"
+source-map@^0.5.0:
+ version "0.5.7"
+ resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
+ integrity sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==
+
source-map@^0.6.0, source-map@~0.6.0, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz"
@@ -5366,6 +5678,13 @@ [email protected]:
resolved "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.0.7.tgz"
integrity sha512-b3sUzamS086YLRuvnaDigdAewz1/EFYlHpYBP5mZovKEdQQOIIYq8lApylub3HHZ6xFjV051kkGU7cudJmrXEA==
+supports-color@^5.3.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
+ integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
+ dependencies:
+ has-flag "^3.0.0"
+
supports-color@^7.1.0:
version "7.2.0"
resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz"
@@ -5460,6 +5779,11 @@ tiny-relative-date@^1.3.0:
resolved "https://registry.npmjs.org/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz"
integrity sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A==
+to-fast-properties@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
+ integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==
+
to-regex-range@^5.0.1:
version "5.0.1"
resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz"
@@ -5532,12 +5856,7 @@ type-check@~0.3.2:
dependencies:
prelude-ls "~1.1.2"
- version "4.7.2"
- resolved "https://registry.npmjs.org/typescript/-/typescript-4.7.2.tgz"
- integrity sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==
-
-typescript@^4.7.4:
+typescript@^4.7.4, typescript@^4.8.4:
version "4.8.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6"
integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==