diff --git a/.eslintrc b/.eslintrc index 45bdcc792..fd4742bdd 100644 --- a/.eslintrc +++ b/.eslintrc @@ -26,6 +26,7 @@ "@typescript-eslint/no-unnecessary-condition": "error", "@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", "@typescript-eslint/no-redundant-type-constituents": "off", - "@typescript-eslint/no-unused-vars": "off" + "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/consistent-type-imports": "error" } } diff --git a/apps/api/tsconfig.json b/apps/api/tsconfig.json index 17236849d..8d4d8a3d0 100644 --- a/apps/api/tsconfig.json +++ b/apps/api/tsconfig.json @@ -3,21 +3,15 @@ "compilerOptions": { "target": "esnext", "module": "commonjs", - "esModuleInterop": true, "moduleResolution": "node", "importHelpers": true, - "resolveJsonModule": true, + "verbatimModuleSyntax": false, "experimentalDecorators": true, "emitDecoratorMetadata": true, - "declaration": false, "allowSyntheticDefaultImports": true, - "allowJs": true, - "skipLibCheck": true, - "outDir": "dist", - "strict": true, - "lib": ["esnext"], + "baseUrl": ".", "paths": { "~/*": ["./src/*"], diff --git a/apps/client/src/components/account/2fa/manage-2fa-modal.tsx b/apps/client/src/components/account/2fa/manage-2fa-modal.tsx index fe88b9343..576ee331f 100644 --- a/apps/client/src/components/account/2fa/manage-2fa-modal.tsx +++ b/apps/client/src/components/account/2fa/manage-2fa-modal.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { Button, Loader, TextField } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import useFetch from "lib/useFetch"; import { useTranslations } from "next-intl"; import { ModalIds } from "types/modal-ids"; diff --git a/apps/client/src/components/account/settings/account-settings-tab.tsx b/apps/client/src/components/account/settings/account-settings-tab.tsx index a81c5d17f..ad5057ece 100644 --- a/apps/client/src/components/account/settings/account-settings-tab.tsx +++ b/apps/client/src/components/account/settings/account-settings-tab.tsx @@ -1,5 +1,5 @@ import { useTranslations } from "use-intl"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { CHANGE_USER_SCHEMA } from "@snailycad/schemas"; import { useAuth } from "context/AuthContext"; import useFetch from "lib/useFetch"; diff --git a/apps/client/src/components/account/settings/change-password-area.tsx b/apps/client/src/components/account/settings/change-password-area.tsx index 5f12a3b2f..6f39664d4 100644 --- a/apps/client/src/components/account/settings/change-password-area.tsx +++ b/apps/client/src/components/account/settings/change-password-area.tsx @@ -2,7 +2,7 @@ import { CHANGE_PASSWORD_SCHEMA } from "@snailycad/schemas"; import type { PostUserPasswordData } from "@snailycad/types/api"; import { Button, TextField } from "@snailycad/ui"; import { useAuth } from "context/AuthContext"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import toast from "react-hot-toast"; diff --git a/apps/client/src/components/account/user-api-token-tab.tsx b/apps/client/src/components/account/user-api-token-tab.tsx index 7649dc4e8..ef0cf067a 100644 --- a/apps/client/src/components/account/user-api-token-tab.tsx +++ b/apps/client/src/components/account/user-api-token-tab.tsx @@ -1,5 +1,5 @@ import { useAuth } from "context/AuthContext"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import useFetch from "lib/useFetch"; import { useTranslations } from "use-intl"; import { Button, Loader, SwitchField, TabsContent, TextField } from "@snailycad/ui"; diff --git a/apps/client/src/components/active-bolos/bolo-filters.tsx b/apps/client/src/components/active-bolos/bolo-filters.tsx index 885d0d71c..ee1aac028 100644 --- a/apps/client/src/components/active-bolos/bolo-filters.tsx +++ b/apps/client/src/components/active-bolos/bolo-filters.tsx @@ -1,5 +1,5 @@ import { Loader, SelectField, TextField } from "@snailycad/ui"; -import { Bolo, BoloType } from "@snailycad/types"; +import { type Bolo, BoloType } from "@snailycad/types"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; import { useTranslations } from "next-intl"; import { makeUnitName } from "lib/utils"; diff --git a/apps/client/src/components/active-bolos/manage-bolo-modal.tsx b/apps/client/src/components/active-bolos/manage-bolo-modal.tsx index aea158431..1ba397d23 100644 --- a/apps/client/src/components/active-bolos/manage-bolo-modal.tsx +++ b/apps/client/src/components/active-bolos/manage-bolo-modal.tsx @@ -6,7 +6,7 @@ import { Form, Formik } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { ModalIds } from "types/modal-ids"; -import { Bolo, BoloType, RegisteredVehicle } from "@snailycad/types"; +import { type Bolo, BoloType, type RegisteredVehicle } from "@snailycad/types"; import { useTranslations } from "use-intl"; import { CREATE_BOLO_SCHEMA } from "@snailycad/schemas"; import { useDispatchState } from "state/dispatch/dispatch-state"; diff --git a/apps/client/src/components/admin/Sidebar.tsx b/apps/client/src/components/admin/Sidebar.tsx index e740b37b6..6f98cad24 100644 --- a/apps/client/src/components/admin/Sidebar.tsx +++ b/apps/client/src/components/admin/Sidebar.tsx @@ -5,7 +5,7 @@ import Link from "next/link"; import { useRouter } from "next/router"; import { useTranslations } from "use-intl"; import { useViewport } from "@casperiv/useful/hooks/useViewport"; -import { importRoutes, managementRoutes, SidebarRoute, valueRoutes } from "./Sidebar/routes"; +import { importRoutes, managementRoutes, type SidebarRoute, valueRoutes } from "./Sidebar/routes"; import { usePermission } from "hooks/usePermission"; import { defaultPermissions, Permissions } from "@snailycad/permissions"; import { SidebarSection } from "./Sidebar/SidebarSection"; diff --git a/apps/client/src/components/admin/import/ImportModal.tsx b/apps/client/src/components/admin/import/ImportModal.tsx index 2c1162f5c..6271525df 100644 --- a/apps/client/src/components/admin/import/ImportModal.tsx +++ b/apps/client/src/components/admin/import/ImportModal.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { FormField } from "components/form/FormField"; import { Button, Input, Loader } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import useFetch from "lib/useFetch"; import { useModal } from "state/modalState"; import { useTranslations } from "use-intl"; diff --git a/apps/client/src/components/admin/manage/cad-settings/api-token-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/api-token-tab.tsx index 3ba2a711f..3d482cb7d 100644 --- a/apps/client/src/components/admin/manage/cad-settings/api-token-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/api-token-tab.tsx @@ -1,7 +1,7 @@ import type * as React from "react"; import { Button, Loader, SwitchField, TextField } from "@snailycad/ui"; import { useAuth } from "context/AuthContext"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import useFetch from "lib/useFetch"; import { useTranslations } from "use-intl"; import { SettingsFormField } from "components/form/SettingsFormField"; diff --git a/apps/client/src/components/admin/manage/cad-settings/default-permissions-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/default-permissions-tab.tsx index 2e885eee2..3f2f76c71 100644 --- a/apps/client/src/components/admin/manage/cad-settings/default-permissions-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/default-permissions-tab.tsx @@ -1,4 +1,4 @@ -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { useTranslations } from "use-intl"; import { Alert, Button, Loader, SwitchField, TextField } from "@snailycad/ui"; @@ -8,7 +8,7 @@ import type { cad } from "@snailycad/types"; import { toastMessage } from "lib/toastMessage"; import type { PutCADDefaultPermissionsData } from "@snailycad/types/api"; import { usePermissionsModal } from "hooks/use-permissions-modal"; -import { PermissionNames, getPermissions, defaultPermissions } from "@snailycad/permissions"; +import { type PermissionNames, getPermissions, defaultPermissions } from "@snailycad/permissions"; import { TabsContent } from "@radix-ui/react-tabs"; import { SettingsTabs } from "components/admin/cad-settings/layout"; diff --git a/apps/client/src/components/admin/manage/cad-settings/discord-roles-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/discord-roles-tab.tsx index b8cc8b69c..30983e98b 100644 --- a/apps/client/src/components/admin/manage/cad-settings/discord-roles-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/discord-roles-tab.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { Select, SelectValue } from "components/form/Select"; +import { Select, type SelectValue } from "components/form/Select"; import { Alert, Button, Loader } from "@snailycad/ui"; import { Form, Formik, useFormikContext } from "formik"; import useFetch from "lib/useFetch"; diff --git a/apps/client/src/components/admin/manage/cad-settings/discord-webhooks/discord-webhooks-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/discord-webhooks/discord-webhooks-tab.tsx index 85f108320..3e05b68b9 100644 --- a/apps/client/src/components/admin/manage/cad-settings/discord-webhooks/discord-webhooks-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/discord-webhooks/discord-webhooks-tab.tsx @@ -4,7 +4,7 @@ import { Form, Formik } from "formik"; import useFetch from "lib/useFetch"; import { useTranslations } from "next-intl"; import { useAuth } from "context/AuthContext"; -import { cad, DiscordWebhookType } from "@snailycad/types"; +import { type cad, DiscordWebhookType } from "@snailycad/types"; import { WebhookSettingsField } from "./WebhookSettingsField"; import { toastMessage } from "lib/toastMessage"; import type { GetCADDiscordWebhooksData, PostCADDiscordWebhooksData } from "@snailycad/types/api"; diff --git a/apps/client/src/components/admin/manage/cad-settings/general/blacklisted-words-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/general/blacklisted-words-tab.tsx index 0b79dd941..263a129b1 100644 --- a/apps/client/src/components/admin/manage/cad-settings/general/blacklisted-words-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/general/blacklisted-words-tab.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { TabsContent } from "@radix-ui/react-tabs"; -import { GetBlacklistedWordsData } from "@snailycad/types/api"; +import type { GetBlacklistedWordsData } from "@snailycad/types/api"; import { Button, FullDate } from "@snailycad/ui"; import { SettingsTabs } from "components/admin/cad-settings/layout"; import { Table, useAsyncTable, useTableState } from "components/shared/Table"; @@ -11,7 +11,7 @@ import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { AlertModal } from "components/modal/AlertModal"; import { SearchArea } from "components/shared/search/search-area"; -import { BlacklistedWord } from "@snailycad/types"; +import type { BlacklistedWord } from "@snailycad/types"; import { ImportBlacklistedWordsModal } from "./import-blacklisted-words-modal"; export function BlacklistedWordsTab() { diff --git a/apps/client/src/components/admin/manage/cad-settings/general/cad-features-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/general/cad-features-tab.tsx index ea9a6a620..dd59e5867 100644 --- a/apps/client/src/components/admin/manage/cad-settings/general/cad-features-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/general/cad-features-tab.tsx @@ -4,8 +4,8 @@ import { useTranslations } from "use-intl"; import { useAuth } from "context/AuthContext"; import useFetch from "lib/useFetch"; import { - CadFeature, - CadFeatureOptions, + type CadFeature, + type CadFeatureOptions, CourthouseType, Feature, LicenseExamType, diff --git a/apps/client/src/components/admin/manage/cad-settings/general/general-settings-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/general/general-settings-tab.tsx index 64087ce4a..87848a95a 100644 --- a/apps/client/src/components/admin/manage/cad-settings/general/general-settings-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/general/general-settings-tab.tsx @@ -16,7 +16,7 @@ import { CAD_SETTINGS_SCHEMA } from "@snailycad/schemas"; import { ImageSelectInput, validateFile } from "components/form/inputs/ImageSelectInput"; import { SettingsFormField } from "components/form/SettingsFormField"; import { useFeatureEnabled } from "hooks/useFeatureEnabled"; -import { Formik, FormikHelpers } from "formik"; +import { Formik, type FormikHelpers } from "formik"; import { toastMessage } from "lib/toastMessage"; import type { PutCADSettingsData } from "@snailycad/types/api"; import { TabsContent } from "@radix-ui/react-tabs"; diff --git a/apps/client/src/components/admin/manage/cad-settings/general/import-blacklisted-words-modal.tsx b/apps/client/src/components/admin/manage/cad-settings/general/import-blacklisted-words-modal.tsx index 04c33a041..c9f86a87f 100644 --- a/apps/client/src/components/admin/manage/cad-settings/general/import-blacklisted-words-modal.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/general/import-blacklisted-words-modal.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { FormField } from "components/form/FormField"; import { Input, Loader, Button } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import useFetch from "lib/useFetch"; import { useModal } from "state/modalState"; import { useTranslations } from "use-intl"; diff --git a/apps/client/src/components/admin/manage/cad-settings/general/whitelist-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/general/whitelist-tab.tsx index 69009f2b0..5f0be9cc8 100644 --- a/apps/client/src/components/admin/manage/cad-settings/general/whitelist-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/general/whitelist-tab.tsx @@ -1,5 +1,5 @@ import { TabsContent } from "@radix-ui/react-tabs"; -import { PutCADSettingsData } from "@snailycad/types/api"; +import type { PutCADSettingsData } from "@snailycad/types/api"; import { Button, Loader, SwitchField } from "@snailycad/ui"; import { SettingsTabs } from "components/admin/cad-settings/layout"; import { SettingsFormField } from "components/form/SettingsFormField"; diff --git a/apps/client/src/components/admin/manage/cad-settings/live-map-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/live-map-tab.tsx index 2d77be5cf..27009cc35 100644 --- a/apps/client/src/components/admin/manage/cad-settings/live-map-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/live-map-tab.tsx @@ -2,7 +2,7 @@ import * as Popover from "@radix-ui/react-popover"; import * as React from "react"; import { Alert, Button, Input, Loader, TextField } from "@snailycad/ui"; import { useAuth } from "context/AuthContext"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import useFetch from "lib/useFetch"; import { useTranslations } from "use-intl"; import { SettingsFormField } from "components/form/SettingsFormField"; @@ -11,7 +11,7 @@ import type { PutCADMiscSettingsData } from "@snailycad/types/api"; import Link from "next/link"; import { BoxArrowUpRight, ChevronDown } from "react-bootstrap-icons"; import { Table, useTableState } from "components/shared/Table"; -import { MiscCadSettings, LiveMapURL } from "@snailycad/types"; +import type { MiscCadSettings, LiveMapURL } from "@snailycad/types"; import { TabsContent } from "@radix-ui/react-tabs"; import { SettingsTabs } from "components/admin/cad-settings/layout"; diff --git a/apps/client/src/components/admin/manage/cad-settings/misc-features/inactivity-timeout-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/misc-features/inactivity-timeout-tab.tsx index 34ce1ebc0..7aaddc5c9 100644 --- a/apps/client/src/components/admin/manage/cad-settings/misc-features/inactivity-timeout-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/misc-features/inactivity-timeout-tab.tsx @@ -1,6 +1,6 @@ import { TabsContent } from "@radix-ui/react-tabs"; -import { MiscCadSettings } from "@snailycad/types"; -import { PutCADMiscSettingsData } from "@snailycad/types/api"; +import type { MiscCadSettings } from "@snailycad/types"; +import type { PutCADMiscSettingsData } from "@snailycad/types/api"; import { Button, Input, Loader } from "@snailycad/ui"; import { SettingsTabs } from "components/admin/cad-settings/layout"; import { SettingsFormField } from "components/form/SettingsFormField"; diff --git a/apps/client/src/components/admin/manage/cad-settings/misc-features/license-number-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/misc-features/license-number-tab.tsx index bb961ebea..c59548459 100644 --- a/apps/client/src/components/admin/manage/cad-settings/misc-features/license-number-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/misc-features/license-number-tab.tsx @@ -1,5 +1,5 @@ import { TabsContent } from "@radix-ui/react-tabs"; -import { PutCADMiscSettingsData } from "@snailycad/types/api"; +import type { PutCADMiscSettingsData } from "@snailycad/types/api"; import { Button, Input, Loader } from "@snailycad/ui"; import { SettingsTabs } from "components/admin/cad-settings/layout"; import { SettingsFormField } from "components/form/SettingsFormField"; @@ -9,7 +9,7 @@ import useFetch from "lib/useFetch"; import { useTranslations } from "use-intl"; import { cleanValues } from "./other-misc-tab"; import { toastMessage } from "lib/toastMessage"; -import { MiscCadSettings } from "@snailycad/types"; +import type { MiscCadSettings } from "@snailycad/types"; export function LicenseNumbersTab() { const t = useTranslations("MiscSettingsTab"); diff --git a/apps/client/src/components/admin/manage/cad-settings/misc-features/limits-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/misc-features/limits-tab.tsx index d2c704819..bbe83ea29 100644 --- a/apps/client/src/components/admin/manage/cad-settings/misc-features/limits-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/misc-features/limits-tab.tsx @@ -1,4 +1,4 @@ -import { PutCADMiscSettingsData } from "@snailycad/types/api"; +import type { PutCADMiscSettingsData } from "@snailycad/types/api"; import { Button, Input, Loader } from "@snailycad/ui"; import { SettingsFormField } from "components/form/SettingsFormField"; import { useAuth } from "context/AuthContext"; @@ -9,7 +9,7 @@ import { cleanValues } from "./other-misc-tab"; import { toastMessage } from "lib/toastMessage"; import { TabsContent } from "@radix-ui/react-tabs"; import { SettingsTabs } from "components/admin/cad-settings/layout"; -import { MiscCadSettings } from "@snailycad/types"; +import type { MiscCadSettings } from "@snailycad/types"; import { useFeatureEnabled } from "hooks/useFeatureEnabled"; export function LimitsTab() { diff --git a/apps/client/src/components/admin/manage/cad-settings/misc-features/max-license-points-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/misc-features/max-license-points-tab.tsx index d1083d227..2a8235253 100644 --- a/apps/client/src/components/admin/manage/cad-settings/misc-features/max-license-points-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/misc-features/max-license-points-tab.tsx @@ -1,10 +1,10 @@ -import { MiscCadSettings } from "@snailycad/types"; +import type { MiscCadSettings } from "@snailycad/types"; import { Button, Input, Loader } from "@snailycad/ui"; import { SettingsFormField } from "components/form/SettingsFormField"; import { toastMessage } from "lib/toastMessage"; import { useTranslations } from "use-intl"; import { cleanValues } from "./other-misc-tab"; -import { PutCADMiscSettingsData } from "@snailycad/types/api"; +import type { PutCADMiscSettingsData } from "@snailycad/types/api"; import useFetch from "lib/useFetch"; import { useAuth } from "context/AuthContext"; import { Form, Formik } from "formik"; diff --git a/apps/client/src/components/admin/manage/cad-settings/misc-features/other-misc-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/misc-features/other-misc-tab.tsx index c07688111..8a79cfdf9 100644 --- a/apps/client/src/components/admin/manage/cad-settings/misc-features/other-misc-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/misc-features/other-misc-tab.tsx @@ -5,7 +5,7 @@ import { useTranslations } from "use-intl"; import { Loader, Input, Button } from "@snailycad/ui"; import { useAuth } from "context/AuthContext"; import useFetch from "lib/useFetch"; -import { JailTimeScale, MiscCadSettings } from "@snailycad/types"; +import { JailTimeScale, type MiscCadSettings } from "@snailycad/types"; import { SettingsFormField } from "components/form/SettingsFormField"; import { Select } from "components/form/Select"; import { toastMessage } from "lib/toastMessage"; diff --git a/apps/client/src/components/admin/manage/cad-settings/misc-features/template-tab.tsx b/apps/client/src/components/admin/manage/cad-settings/misc-features/template-tab.tsx index 46cccf5fc..d8b249d94 100644 --- a/apps/client/src/components/admin/manage/cad-settings/misc-features/template-tab.tsx +++ b/apps/client/src/components/admin/manage/cad-settings/misc-features/template-tab.tsx @@ -1,4 +1,4 @@ -import { PutCADMiscSettingsData } from "@snailycad/types/api"; +import type { PutCADMiscSettingsData } from "@snailycad/types/api"; import { Button, Input, Loader } from "@snailycad/ui"; import { SettingsFormField } from "components/form/SettingsFormField"; import { useAuth } from "context/AuthContext"; @@ -9,7 +9,7 @@ import { cleanValues } from "./other-misc-tab"; import { toastMessage } from "lib/toastMessage"; import { TabsContent } from "@radix-ui/react-tabs"; import { SettingsTabs } from "components/admin/cad-settings/layout"; -import { MiscCadSettings } from "@snailycad/types"; +import type { MiscCadSettings } from "@snailycad/types"; export const CALLSIGN_TEMPLATE_VARIABLES = ( diff --git a/apps/client/src/components/admin/manage/citizens/all-citizens-tab.tsx b/apps/client/src/components/admin/manage/citizens/all-citizens-tab.tsx index c5dddd745..a54705e95 100644 --- a/apps/client/src/components/admin/manage/citizens/all-citizens-tab.tsx +++ b/apps/client/src/components/admin/manage/citizens/all-citizens-tab.tsx @@ -19,7 +19,7 @@ import { useAsyncTable } from "hooks/shared/table/use-async-table"; import type { DeleteManageCitizenByIdData, GetManageCitizensData } from "@snailycad/types/api"; import { useTemporaryItem } from "hooks/shared/useTemporaryItem"; import dynamic from "next/dynamic"; -import { User } from "@snailycad/types"; +import type { User } from "@snailycad/types"; const AlertModal = dynamic(async () => (await import("components/modal/AlertModal")).AlertModal, { ssr: false, diff --git a/apps/client/src/components/admin/manage/courthouse/pending-warrants-tab.tsx b/apps/client/src/components/admin/manage/courthouse/pending-warrants-tab.tsx index 332268ea0..7158c28cf 100644 --- a/apps/client/src/components/admin/manage/courthouse/pending-warrants-tab.tsx +++ b/apps/client/src/components/admin/manage/courthouse/pending-warrants-tab.tsx @@ -1,4 +1,4 @@ -import { Warrant, WhitelistStatus } from "@snailycad/types"; +import { type Warrant, WhitelistStatus } from "@snailycad/types"; import { Table, useAsyncTable, useTableState } from "components/shared/Table"; import { useTranslations } from "next-intl"; import { Button, FullDate, TabsContent } from "@snailycad/ui"; diff --git a/apps/client/src/components/admin/manage/custom-fields/ManageCustomFieldModal.tsx b/apps/client/src/components/admin/manage/custom-fields/ManageCustomFieldModal.tsx index c3f53cb9e..38e1b8344 100644 --- a/apps/client/src/components/admin/manage/custom-fields/ManageCustomFieldModal.tsx +++ b/apps/client/src/components/admin/manage/custom-fields/ManageCustomFieldModal.tsx @@ -1,10 +1,10 @@ import { Loader, Button, TextField, SelectField } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { useModal } from "state/modalState"; -import { CustomField, CustomFieldCategory } from "@snailycad/types"; +import { type CustomField, CustomFieldCategory } from "@snailycad/types"; import { useTranslations } from "use-intl"; import { ModalIds } from "types/modal-ids"; import { CUSTOM_FIELDS_SCHEMA } from "@snailycad/schemas"; diff --git a/apps/client/src/components/admin/manage/custom-roles/manage-custom-roles-modal.tsx b/apps/client/src/components/admin/manage/custom-roles/manage-custom-roles-modal.tsx index f8e311c37..e594aad7f 100644 --- a/apps/client/src/components/admin/manage/custom-roles/manage-custom-roles-modal.tsx +++ b/apps/client/src/components/admin/manage/custom-roles/manage-custom-roles-modal.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { Button, Loader, SelectField, TextField } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { useModal } from "state/modalState"; diff --git a/apps/client/src/components/admin/manage/units/QualificationsTable.tsx b/apps/client/src/components/admin/manage/units/QualificationsTable.tsx index 4f5ae3eea..7788e0a5e 100644 --- a/apps/client/src/components/admin/manage/units/QualificationsTable.tsx +++ b/apps/client/src/components/admin/manage/units/QualificationsTable.tsx @@ -1,5 +1,5 @@ import type * as React from "react"; -import { QualificationValueType, UnitQualification } from "@snailycad/types"; +import { QualificationValueType, type UnitQualification } from "@snailycad/types"; import { Button, FullDate } from "@snailycad/ui"; import { AlertModal } from "components/modal/AlertModal"; import { Table, useTableState } from "components/shared/Table"; diff --git a/apps/client/src/components/admin/manage/units/tabs/manage-unit-tab/manage-unit-tab.tsx b/apps/client/src/components/admin/manage/units/tabs/manage-unit-tab/manage-unit-tab.tsx index 90630a5cd..0f8a77866 100644 --- a/apps/client/src/components/admin/manage/units/tabs/manage-unit-tab/manage-unit-tab.tsx +++ b/apps/client/src/components/admin/manage/units/tabs/manage-unit-tab/manage-unit-tab.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { getUnitDepartment } from "lib/utils"; import { useTranslations } from "use-intl"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { useValues } from "context/ValuesContext"; import { Loader, diff --git a/apps/client/src/components/admin/manage/users/modals/manage-permissions-modal.tsx b/apps/client/src/components/admin/manage/users/modals/manage-permissions-modal.tsx index 812095a05..a9280308c 100644 --- a/apps/client/src/components/admin/manage/users/modals/manage-permissions-modal.tsx +++ b/apps/client/src/components/admin/manage/users/modals/manage-permissions-modal.tsx @@ -3,7 +3,7 @@ import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; import { useTranslations } from "next-intl"; import { ModalIds } from "types/modal-ids"; -import { getPermissions, PermissionNames, Permissions } from "@snailycad/permissions"; +import { getPermissions, type PermissionNames, Permissions } from "@snailycad/permissions"; import { Form, Formik } from "formik"; import useFetch from "lib/useFetch"; import { Loader, Button, TextField, SwitchField } from "@snailycad/ui"; diff --git a/apps/client/src/components/admin/values/ManageValueModal.tsx b/apps/client/src/components/admin/values/ManageValueModal.tsx index b3f30b3c8..402b31dbc 100644 --- a/apps/client/src/components/admin/values/ManageValueModal.tsx +++ b/apps/client/src/components/admin/values/ManageValueModal.tsx @@ -10,13 +10,13 @@ import { } from "@snailycad/schemas"; import { Loader, Button, SelectField, TextField, SwitchField } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { useModal } from "state/modalState"; import { useValues } from "context/ValuesContext"; import { - AnyValue, + type AnyValue, DriversLicenseCategoryType, EmployeeAsEnum, Feature, diff --git a/apps/client/src/components/admin/values/import/import-values-modal.tsx b/apps/client/src/components/admin/values/import/import-values-modal.tsx index 9aae052de..32f0db03d 100644 --- a/apps/client/src/components/admin/values/import/import-values-modal.tsx +++ b/apps/client/src/components/admin/values/import/import-values-modal.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import { FormField } from "components/form/FormField"; import { Input, Loader, Button } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import useFetch from "lib/useFetch"; import { useModal } from "state/modalState"; import { useTranslations } from "use-intl"; diff --git a/apps/client/src/components/admin/values/manage-modal/address-fields.tsx b/apps/client/src/components/admin/values/manage-modal/address-fields.tsx index 20559df1f..cb348335a 100644 --- a/apps/client/src/components/admin/values/manage-modal/address-fields.tsx +++ b/apps/client/src/components/admin/values/manage-modal/address-fields.tsx @@ -1,7 +1,7 @@ import { TextField } from "@snailycad/ui"; import { useFormikContext } from "formik"; import { useTranslations } from "use-intl"; -import { ManageValueFormValues } from "../ManageValueModal"; +import type { ManageValueFormValues } from "../ManageValueModal"; export function AddressFields() { const { values, errors, setFieldValue } = useFormikContext(); diff --git a/apps/client/src/components/admin/values/manage-modal/department-fields.tsx b/apps/client/src/components/admin/values/manage-modal/department-fields.tsx index 539847302..48ca7ec43 100644 --- a/apps/client/src/components/admin/values/manage-modal/department-fields.tsx +++ b/apps/client/src/components/admin/values/manage-modal/department-fields.tsx @@ -6,7 +6,7 @@ import { useTranslations } from "use-intl"; import { ValueSelectField } from "components/form/inputs/value-select-field"; import { CALLSIGN_TEMPLATE_VARIABLES } from "components/admin/manage/cad-settings/misc-features/template-tab"; import { DepartmentLinksSection } from "./department-links-section"; -import { ManageValueFormValues } from "../ManageValueModal"; +import type { ManageValueFormValues } from "../ManageValueModal"; export const DEPARTMENT_LABELS = { [DepartmentType.LEO]: "LEO", diff --git a/apps/client/src/components/admin/values/manage-modal/department-links-section.tsx b/apps/client/src/components/admin/values/manage-modal/department-links-section.tsx index ff37694b9..e0befdbdc 100644 --- a/apps/client/src/components/admin/values/manage-modal/department-links-section.tsx +++ b/apps/client/src/components/admin/values/manage-modal/department-links-section.tsx @@ -3,10 +3,10 @@ import * as Popover from "@radix-ui/react-popover"; import * as React from "react"; import { useTranslations } from "use-intl"; import { useFormikContext } from "formik"; -import { DepartmentValueLink } from "@snailycad/types"; +import type { DepartmentValueLink } from "@snailycad/types"; import { Table, useTableState } from "components/shared/Table"; import { v4 } from "uuid"; -import { ManageValueFormValues } from "../ManageValueModal"; +import type { ManageValueFormValues } from "../ManageValueModal"; export function DepartmentLinksSection() { const [openPopover, setOpenPopover] = React.useState<"new" | null>(null); diff --git a/apps/client/src/components/admin/values/manage-modal/division-fields.tsx b/apps/client/src/components/admin/values/manage-modal/division-fields.tsx index 8fc9f2a6d..da188f514 100644 --- a/apps/client/src/components/admin/values/manage-modal/division-fields.tsx +++ b/apps/client/src/components/admin/values/manage-modal/division-fields.tsx @@ -4,7 +4,7 @@ import { useFormikContext } from "formik"; import { useTranslations } from "use-intl"; import { ValueSelectField } from "components/form/inputs/value-select-field"; import { ValueType } from "@snailycad/types"; -import { ManageValueFormValues } from "../ManageValueModal"; +import type { ManageValueFormValues } from "../ManageValueModal"; export function DivisionFields() { const { values, errors, setFieldValue } = useFormikContext(); diff --git a/apps/client/src/components/admin/values/manage-modal/emergency-vehicle-fields.tsx b/apps/client/src/components/admin/values/manage-modal/emergency-vehicle-fields.tsx index d4aef922f..6aed7fe2c 100644 --- a/apps/client/src/components/admin/values/manage-modal/emergency-vehicle-fields.tsx +++ b/apps/client/src/components/admin/values/manage-modal/emergency-vehicle-fields.tsx @@ -5,7 +5,7 @@ import { useValues } from "context/ValuesContext"; import { useFormikContext } from "formik"; import { useFeatureEnabled } from "hooks/useFeatureEnabled"; import { useTranslations } from "use-intl"; -import { ManageValueFormValues } from "../ManageValueModal"; +import type { ManageValueFormValues } from "../ManageValueModal"; export function useDefaultDivisions() { const { division } = useValues(); diff --git a/apps/client/src/components/admin/values/manage-modal/license-fields.tsx b/apps/client/src/components/admin/values/manage-modal/license-fields.tsx index fe4d28e45..e5357562c 100644 --- a/apps/client/src/components/admin/values/manage-modal/license-fields.tsx +++ b/apps/client/src/components/admin/values/manage-modal/license-fields.tsx @@ -2,7 +2,7 @@ import { ValueLicenseType } from "@snailycad/types"; import { SelectField, SwitchField } from "@snailycad/ui"; import { useFormikContext } from "formik"; import { useTranslations } from "use-intl"; -import { ManageValueFormValues } from "../ManageValueModal"; +import type { ManageValueFormValues } from "../ManageValueModal"; export function useLicenseLabels() { const t = useTranslations("Values"); diff --git a/apps/client/src/components/admin/values/manage-modal/qualification-fields.tsx b/apps/client/src/components/admin/values/manage-modal/qualification-fields.tsx index 7b35ccc31..5dbd7e075 100644 --- a/apps/client/src/components/admin/values/manage-modal/qualification-fields.tsx +++ b/apps/client/src/components/admin/values/manage-modal/qualification-fields.tsx @@ -4,7 +4,7 @@ import { useValues } from "context/ValuesContext"; import { SelectField, TextField } from "@snailycad/ui"; import { QualificationValueType } from "@snailycad/types"; import { useTranslations } from "use-intl"; -import { ManageValueFormValues } from "../ManageValueModal"; +import type { ManageValueFormValues } from "../ManageValueModal"; export function QualificationFields({ image, setImage }: any) { const { values, errors, setFieldValue } = useFormikContext(); diff --git a/apps/client/src/components/admin/values/manage-modal/status-value-fields.tsx b/apps/client/src/components/admin/values/manage-modal/status-value-fields.tsx index a8c5c3763..36feec449 100644 --- a/apps/client/src/components/admin/values/manage-modal/status-value-fields.tsx +++ b/apps/client/src/components/admin/values/manage-modal/status-value-fields.tsx @@ -1,14 +1,14 @@ import { FormField } from "components/form/FormField"; import { useFormikContext } from "formik"; import dynamic from "next/dynamic"; -import { AnyValue, ShouldDoType, StatusValueType, WhatPages } from "@snailycad/types"; +import { type AnyValue, ShouldDoType, StatusValueType, WhatPages } from "@snailycad/types"; import { Eyedropper } from "react-bootstrap-icons"; import { Input, Button, SelectField, RadioGroupField, Radio } from "@snailycad/ui"; import { useValues } from "context/ValuesContext"; import { useTranslations } from "use-intl"; import { isOfficerRankValue } from "@snailycad/utils"; -import { ManageValueFormValues } from "../ManageValueModal"; +import type { ManageValueFormValues } from "../ManageValueModal"; import { generateContrastColor } from "lib/table/get-contrasting-text-color"; const HexColorPicker = dynamic(async () => (await import("react-colorful")).HexColorPicker); diff --git a/apps/client/src/components/admin/values/manage-modal/vehicle-fields.tsx b/apps/client/src/components/admin/values/manage-modal/vehicle-fields.tsx index ef982b6a8..264cbbfd6 100644 --- a/apps/client/src/components/admin/values/manage-modal/vehicle-fields.tsx +++ b/apps/client/src/components/admin/values/manage-modal/vehicle-fields.tsx @@ -3,7 +3,7 @@ import { ImageSelectInput } from "components/form/inputs/ImageSelectInput"; import { useValues } from "context/ValuesContext"; import { SelectField } from "@snailycad/ui"; import { useTranslations } from "use-intl"; -import { ManageValueFormValues } from "../ManageValueModal"; +import type { ManageValueFormValues } from "../ManageValueModal"; export function VehicleFields({ image, setImage }: any) { const { values, errors, setFieldValue } = useFormikContext(); diff --git a/apps/client/src/components/admin/values/penal-codes/manage-penal-code-modal.tsx b/apps/client/src/components/admin/values/penal-codes/manage-penal-code-modal.tsx index af370678b..b6dbcb44d 100644 --- a/apps/client/src/components/admin/values/penal-codes/manage-penal-code-modal.tsx +++ b/apps/client/src/components/admin/values/penal-codes/manage-penal-code-modal.tsx @@ -6,7 +6,7 @@ import { Form, Formik, useFormikContext } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { useModal } from "state/modalState"; -import { PenalCode, ValueType, PenalCodeType } from "@snailycad/types"; +import { type PenalCode, ValueType, PenalCodeType } from "@snailycad/types"; import { useTranslations } from "use-intl"; import { dataToSlate, Editor } from "components/editor/editor"; import { ModalIds } from "types/modal-ids"; diff --git a/apps/client/src/components/auth/api-verification.tsx b/apps/client/src/components/auth/api-verification.tsx index 7d4f07826..af300a671 100644 --- a/apps/client/src/components/auth/api-verification.tsx +++ b/apps/client/src/components/auth/api-verification.tsx @@ -1,4 +1,4 @@ -import { GetCADSettingsData } from "@snailycad/types/api"; +import type { GetCADSettingsData } from "@snailycad/types/api"; import { Alert } from "@snailycad/ui"; import { useQuery } from "@tanstack/react-query"; import useFetch from "lib/useFetch"; diff --git a/apps/client/src/components/auth/login/login-form.tsx b/apps/client/src/components/auth/login/login-form.tsx index 4078c5111..ca363c957 100644 --- a/apps/client/src/components/auth/login/login-form.tsx +++ b/apps/client/src/components/auth/login/login-form.tsx @@ -1,4 +1,4 @@ -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import Link from "next/link"; import { Discord, Steam } from "react-bootstrap-icons"; import { Alert, Button, Loader, TextField } from "@snailycad/ui"; diff --git a/apps/client/src/components/bleeter/list/posts-list.tsx b/apps/client/src/components/bleeter/list/posts-list.tsx index 3de46cd56..abd92173b 100644 --- a/apps/client/src/components/bleeter/list/posts-list.tsx +++ b/apps/client/src/components/bleeter/list/posts-list.tsx @@ -1,4 +1,4 @@ -import { BleeterPost, BleeterProfile } from "@snailycad/types"; +import type { BleeterPost, BleeterProfile } from "@snailycad/types"; import { FullDate } from "@snailycad/ui"; import { Editor } from "components/editor/editor"; import { ImageWrapper } from "components/shared/image-wrapper"; diff --git a/apps/client/src/components/bleeter/manage-bleet-modal.tsx b/apps/client/src/components/bleeter/manage-bleet-modal.tsx index 3deb9fc9c..f6a4ebb7d 100644 --- a/apps/client/src/components/bleeter/manage-bleet-modal.tsx +++ b/apps/client/src/components/bleeter/manage-bleet-modal.tsx @@ -1,4 +1,4 @@ -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { useTranslations } from "use-intl"; import { Loader, Input, Button, TextField } from "@snailycad/ui"; diff --git a/apps/client/src/components/bleeter/modals/edit-profile-modal.tsx b/apps/client/src/components/bleeter/modals/edit-profile-modal.tsx index 5d4c2d252..e931b5dad 100644 --- a/apps/client/src/components/bleeter/modals/edit-profile-modal.tsx +++ b/apps/client/src/components/bleeter/modals/edit-profile-modal.tsx @@ -3,7 +3,7 @@ import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; import { NewBleeterExperienceForm } from "../new-bleeter-experience"; -import { BleeterProfile } from "@snailycad/types"; +import type { BleeterProfile } from "@snailycad/types"; interface EditBleeterProfileModalProps { profile: BleeterProfile; diff --git a/apps/client/src/components/bleeter/modals/followers-following-modal.tsx b/apps/client/src/components/bleeter/modals/followers-following-modal.tsx index 2bc16f597..37e9930e9 100644 --- a/apps/client/src/components/bleeter/modals/followers-following-modal.tsx +++ b/apps/client/src/components/bleeter/modals/followers-following-modal.tsx @@ -1,4 +1,4 @@ -import { +import type { GetBleeterProfileFollowersData, GetBleeterProfileFollowingData, } from "@snailycad/types/api"; diff --git a/apps/client/src/components/bleeter/new-bleeter-experience.tsx b/apps/client/src/components/bleeter/new-bleeter-experience.tsx index 275b7ba15..a3aa49b38 100644 --- a/apps/client/src/components/bleeter/new-bleeter-experience.tsx +++ b/apps/client/src/components/bleeter/new-bleeter-experience.tsx @@ -1,8 +1,8 @@ -import { BleeterProfile } from "@snailycad/types"; +import type { BleeterProfile } from "@snailycad/types"; import { Button, Loader, TextField, FormRow } from "@snailycad/ui"; import { Layout } from "components/Layout"; import { Title } from "components/shared/Title"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import useFetch from "lib/useFetch"; import { useRouter } from "next/router"; import { useModal } from "state/modalState"; diff --git a/apps/client/src/components/business/join-business-modal.tsx b/apps/client/src/components/business/join-business-modal.tsx index 5fd8e5534..9929d5f0c 100644 --- a/apps/client/src/components/business/join-business-modal.tsx +++ b/apps/client/src/components/business/join-business-modal.tsx @@ -1,7 +1,7 @@ import { Loader, Button, SelectField } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import useFetch from "lib/useFetch"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; diff --git a/apps/client/src/components/business/manage/tabs/employees-tab/employees-tab.tsx b/apps/client/src/components/business/manage/tabs/employees-tab/employees-tab.tsx index 93a75d1e0..cc1f7145a 100644 --- a/apps/client/src/components/business/manage/tabs/employees-tab/employees-tab.tsx +++ b/apps/client/src/components/business/manage/tabs/employees-tab/employees-tab.tsx @@ -1,10 +1,10 @@ import { useTranslations } from "use-intl"; import { Button, Status, TabsContent } from "@snailycad/ui"; -import { FullEmployee, useBusinessState } from "state/business-state"; +import { type FullEmployee, useBusinessState } from "state/business-state"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { ManageEmployeeModal } from "./manage-employee-modal"; -import { Employee, EmployeeAsEnum, WhitelistStatus } from "@snailycad/types"; +import { type Employee, EmployeeAsEnum, WhitelistStatus } from "@snailycad/types"; import { AlertModal } from "components/modal/AlertModal"; import useFetch from "lib/useFetch"; import { Table, useTableState } from "components/shared/Table"; diff --git a/apps/client/src/components/business/manage/tabs/employees-tab/manage-employee-modal.tsx b/apps/client/src/components/business/manage/tabs/employees-tab/manage-employee-modal.tsx index e2846da44..03b1bc5b9 100644 --- a/apps/client/src/components/business/manage/tabs/employees-tab/manage-employee-modal.tsx +++ b/apps/client/src/components/business/manage/tabs/employees-tab/manage-employee-modal.tsx @@ -1,7 +1,7 @@ import { Loader, Button, SwitchField, FormRow, SelectField } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import useFetch from "lib/useFetch"; import { useBusinessState } from "state/business-state"; import { ModalIds } from "types/modal-ids"; @@ -9,7 +9,7 @@ import { useTranslations } from "use-intl"; import { UPDATE_EMPLOYEE_SCHEMA } from "@snailycad/schemas"; import { handleValidate } from "lib/handleValidate"; import { useValues } from "context/ValuesContext"; -import { Employee, EmployeeAsEnum } from "@snailycad/types"; +import { type Employee, EmployeeAsEnum } from "@snailycad/types"; import type { PutBusinessEmployeesData } from "@snailycad/types/api"; interface Props { diff --git a/apps/client/src/components/business/manage/tabs/pending-employees-tab.tsx b/apps/client/src/components/business/manage/tabs/pending-employees-tab.tsx index dd481db50..962f50684 100644 --- a/apps/client/src/components/business/manage/tabs/pending-employees-tab.tsx +++ b/apps/client/src/components/business/manage/tabs/pending-employees-tab.tsx @@ -1,7 +1,7 @@ import { useTranslations } from "use-intl"; import { Button, TabsContent } from "@snailycad/ui"; import { useBusinessState } from "state/business-state"; -import { Employee, WhitelistStatus } from "@snailycad/types"; +import { type Employee, WhitelistStatus } from "@snailycad/types"; import useFetch from "lib/useFetch"; import { Table, useTableState } from "components/shared/Table"; import type { PutBusinessEmployeesData } from "@snailycad/types/api"; diff --git a/apps/client/src/components/business/manage/tabs/roles-tab/manage-business-role-modal.tsx b/apps/client/src/components/business/manage/tabs/roles-tab/manage-business-role-modal.tsx index dfbb1bb73..75bb7fbb0 100644 --- a/apps/client/src/components/business/manage/tabs/roles-tab/manage-business-role-modal.tsx +++ b/apps/client/src/components/business/manage/tabs/roles-tab/manage-business-role-modal.tsx @@ -1,10 +1,10 @@ import { Loader, Button, SelectField, TextField } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { useModal } from "state/modalState"; -import { EmployeeAsEnum, EmployeeValue } from "@snailycad/types"; +import { EmployeeAsEnum, type EmployeeValue } from "@snailycad/types"; import { useTranslations } from "use-intl"; import { ModalIds } from "types/modal-ids"; import { getValueStrFromValue } from "lib/admin/values/utils"; diff --git a/apps/client/src/components/citizen/ManageCitizenForm.tsx b/apps/client/src/components/citizen/ManageCitizenForm.tsx index 13a2996a8..1b33e3817 100644 --- a/apps/client/src/components/citizen/ManageCitizenForm.tsx +++ b/apps/client/src/components/citizen/ManageCitizenForm.tsx @@ -18,7 +18,7 @@ import { useAuth } from "context/AuthContext"; import { useValues } from "context/ValuesContext"; import { handleValidate } from "lib/handleValidate"; import type { FormikHelpers } from "formik"; -import { User, Citizen, PenalCode, ValueType } from "@snailycad/types"; +import { type User, type Citizen, type PenalCode, ValueType } from "@snailycad/types"; import { useTranslations } from "next-intl"; import { useFeatureEnabled } from "hooks/useFeatureEnabled"; import { diff --git a/apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx b/apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx index 80d1a5c46..b7b1873f5 100644 --- a/apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx +++ b/apps/client/src/components/citizen/licenses/ManageLicensesFormFields.tsx @@ -1,4 +1,9 @@ -import { Citizen, DriversLicenseCategoryType, ValueLicenseType, ValueType } from "@snailycad/types"; +import { + type Citizen, + DriversLicenseCategoryType, + ValueLicenseType, + ValueType, +} from "@snailycad/types"; import { useValues } from "context/ValuesContext"; import { useFormikContext } from "formik"; import { useFeatureEnabled } from "hooks/useFeatureEnabled"; diff --git a/apps/client/src/components/citizen/licenses/licenses-card.tsx b/apps/client/src/components/citizen/licenses/licenses-card.tsx index a3a6aa38f..24b5e60e8 100644 --- a/apps/client/src/components/citizen/licenses/licenses-card.tsx +++ b/apps/client/src/components/citizen/licenses/licenses-card.tsx @@ -2,10 +2,14 @@ import { useTranslations } from "use-intl"; import { Button, FullDate, Infofield } from "@snailycad/ui"; import { ModalIds } from "types/modal-ids"; import { useModal } from "state/modalState"; -import { LicenseInitialValues, ManageLicensesModal } from "./manage-licenses-modal"; -import { CitizenWithVehAndWep, useCitizen } from "context/CitizenContext"; +import { type LicenseInitialValues, ManageLicensesModal } from "./manage-licenses-modal"; +import { type CitizenWithVehAndWep, useCitizen } from "context/CitizenContext"; import { useFeatureEnabled } from "hooks/useFeatureEnabled"; -import { Citizen, DriversLicenseCategoryType, SuspendedCitizenLicenses } from "@snailycad/types"; +import { + type Citizen, + DriversLicenseCategoryType, + type SuspendedCitizenLicenses, +} from "@snailycad/types"; import useFetch from "lib/useFetch"; import type { PutCitizenLicensesByIdData } from "@snailycad/types/api"; diff --git a/apps/client/src/components/citizen/manage-citizen-form/create-previous-records-step.tsx b/apps/client/src/components/citizen/manage-citizen-form/create-previous-records-step.tsx index 81725d314..2804a49a5 100644 --- a/apps/client/src/components/citizen/manage-citizen-form/create-previous-records-step.tsx +++ b/apps/client/src/components/citizen/manage-citizen-form/create-previous-records-step.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { Record, RecordType, ValueType } from "@snailycad/types"; +import { type Record, RecordType, ValueType } from "@snailycad/types"; import { ManageRecordModal } from "components/leo/modals/manage-record/manage-record-modal"; import { useLoadValuesClientSide } from "hooks/useLoadValuesClientSide"; import { useTranslations } from "use-intl"; diff --git a/apps/client/src/components/citizen/medical-records/manage-medical-records-modal.tsx b/apps/client/src/components/citizen/medical-records/manage-medical-records-modal.tsx index a58b74ec8..785f8fe8f 100644 --- a/apps/client/src/components/citizen/medical-records/manage-medical-records-modal.tsx +++ b/apps/client/src/components/citizen/medical-records/manage-medical-records-modal.tsx @@ -5,7 +5,7 @@ import { Modal } from "components/modal/Modal"; import useFetch from "lib/useFetch"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; -import { BaseCitizen, MedicalRecord, ValueType } from "@snailycad/types"; +import { type BaseCitizen, type MedicalRecord, ValueType } from "@snailycad/types"; import { handleValidate } from "lib/handleValidate"; import { useValues } from "context/ValuesContext"; import type { diff --git a/apps/client/src/components/citizen/pets/manage-pet-modal.tsx b/apps/client/src/components/citizen/pets/manage-pet-modal.tsx index 6cf6cc8fc..057394535 100644 --- a/apps/client/src/components/citizen/pets/manage-pet-modal.tsx +++ b/apps/client/src/components/citizen/pets/manage-pet-modal.tsx @@ -1,13 +1,13 @@ import * as React from "react"; import { PET_SCHEMA } from "@snailycad/schemas"; -import { Pet } from "@snailycad/types"; -import { PostPetsData } from "@snailycad/types/api"; +import type { Pet } from "@snailycad/types"; +import type { PostPetsData } from "@snailycad/types/api"; import { Button, DatePickerField, Loader, TextField, FormRow } from "@snailycad/ui"; import { ImageSelectInput, validateFile } from "components/form/inputs/ImageSelectInput"; import { Modal } from "components/modal/Modal"; import { CitizenSuggestionsField } from "components/shared/CitizenSuggestionsField"; import { useAuth } from "context/AuthContext"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { useRouter } from "next/router"; diff --git a/apps/client/src/components/citizen/pets/medical-records/manage-pet-medical-record-modal.tsx b/apps/client/src/components/citizen/pets/medical-records/manage-pet-medical-record-modal.tsx index 83a9aae6b..4af399f1d 100644 --- a/apps/client/src/components/citizen/pets/medical-records/manage-pet-medical-record-modal.tsx +++ b/apps/client/src/components/citizen/pets/medical-records/manage-pet-medical-record-modal.tsx @@ -5,7 +5,7 @@ import { Modal } from "components/modal/Modal"; import useFetch from "lib/useFetch"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; -import { PetMedicalRecord } from "@snailycad/types"; +import type { PetMedicalRecord } from "@snailycad/types"; import { handleValidate } from "lib/handleValidate"; import type { PutPetByIdMedicalRecordsData, diff --git a/apps/client/src/components/citizen/pets/medical-records/pet-medical-records-card.tsx b/apps/client/src/components/citizen/pets/medical-records/pet-medical-records-card.tsx index 7ecdc27e8..a8a326c96 100644 --- a/apps/client/src/components/citizen/pets/medical-records/pet-medical-records-card.tsx +++ b/apps/client/src/components/citizen/pets/medical-records/pet-medical-records-card.tsx @@ -6,7 +6,7 @@ import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; import { ManagePetMedicalRecordModal } from "./manage-pet-medical-record-modal"; import { useTemporaryItem } from "hooks/shared/useTemporaryItem"; -import { PetMedicalRecord } from "@snailycad/types"; +import type { PetMedicalRecord } from "@snailycad/types"; import { AlertModal } from "components/modal/AlertModal"; import useFetch from "lib/useFetch"; diff --git a/apps/client/src/components/citizen/pets/notes/pet-notes-card.tsx b/apps/client/src/components/citizen/pets/notes/pet-notes-card.tsx index bd8aa97d7..c72193f4d 100644 --- a/apps/client/src/components/citizen/pets/notes/pet-notes-card.tsx +++ b/apps/client/src/components/citizen/pets/notes/pet-notes-card.tsx @@ -1,4 +1,4 @@ -import { Note } from "@snailycad/types"; +import type { Note } from "@snailycad/types"; import { Button, FullDate } from "@snailycad/ui"; import { Table, useTableState } from "components/shared/Table"; import { useTemporaryItem } from "hooks/shared/useTemporaryItem"; diff --git a/apps/client/src/components/citizen/records/citizen-records-card.tsx b/apps/client/src/components/citizen/records/citizen-records-card.tsx index 5f1f127af..91452729a 100644 --- a/apps/client/src/components/citizen/records/citizen-records-card.tsx +++ b/apps/client/src/components/citizen/records/citizen-records-card.tsx @@ -1,4 +1,4 @@ -import { GetCitizenByIdRecordsData } from "@snailycad/types/api"; +import type { GetCitizenByIdRecordsData } from "@snailycad/types/api"; import { useQuery } from "@tanstack/react-query"; import { RecordsTab } from "components/leo/modals/NameSearchModal/tabs/records-tab"; import { TableSkeletonLoader } from "components/shared/table/skeleton-loader"; diff --git a/apps/client/src/components/citizen/tow/assign-to-tow-taxi-call.tsx b/apps/client/src/components/citizen/tow/assign-to-tow-taxi-call.tsx index af232c198..63b015d55 100644 --- a/apps/client/src/components/citizen/tow/assign-to-tow-taxi-call.tsx +++ b/apps/client/src/components/citizen/tow/assign-to-tow-taxi-call.tsx @@ -1,4 +1,4 @@ -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { useTranslations } from "use-intl"; import { Loader, Button } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; diff --git a/apps/client/src/components/citizen/vehicles/modals/register-vehicle-modal.tsx b/apps/client/src/components/citizen/vehicles/modals/register-vehicle-modal.tsx index 9cd221488..c4cba9272 100644 --- a/apps/client/src/components/citizen/vehicles/modals/register-vehicle-modal.tsx +++ b/apps/client/src/components/citizen/vehicles/modals/register-vehicle-modal.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { useTranslations } from "use-intl"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { LEO_VEHICLE_SCHEMA, VEHICLE_SCHEMA } from "@snailycad/schemas"; import { Item, @@ -18,10 +18,10 @@ import { useValues } from "src/context/ValuesContext"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { - RegisteredVehicle, + type RegisteredVehicle, ValueLicenseType, ValueType, - VehicleValue, + type VehicleValue, WhitelistStatus, } from "@snailycad/types"; import { handleValidate } from "lib/handleValidate"; diff --git a/apps/client/src/components/citizen/weapons/register-weapon-modal.tsx b/apps/client/src/components/citizen/weapons/register-weapon-modal.tsx index f503e8747..0a6bd0bde 100644 --- a/apps/client/src/components/citizen/weapons/register-weapon-modal.tsx +++ b/apps/client/src/components/citizen/weapons/register-weapon-modal.tsx @@ -1,5 +1,5 @@ import { useTranslations } from "use-intl"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { useRouter } from "next/router"; import { WEAPON_SCHEMA } from "@snailycad/schemas"; import { FormField } from "components/form/FormField"; @@ -12,8 +12,8 @@ import { ModalIds } from "types/modal-ids"; import { ValueLicenseType, ValueType, - Weapon, - WeaponValue, + type Weapon, + type WeaponValue, WhitelistStatus, } from "@snailycad/types"; import { handleValidate } from "lib/handleValidate"; diff --git a/apps/client/src/components/courthouse/court-entries/manage-court-entry-modal.tsx b/apps/client/src/components/courthouse/court-entries/manage-court-entry-modal.tsx index 018ab7dd7..124ae479f 100644 --- a/apps/client/src/components/courthouse/court-entries/manage-court-entry-modal.tsx +++ b/apps/client/src/components/courthouse/court-entries/manage-court-entry-modal.tsx @@ -4,7 +4,7 @@ import { Loader, Button, TextField } from "@snailycad/ui"; import { FormField } from "components/form/FormField"; import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { useTranslations } from "next-intl"; diff --git a/apps/client/src/components/courthouse/courthouse-posts/manage-courthouse-post-modal.tsx b/apps/client/src/components/courthouse/courthouse-posts/manage-courthouse-post-modal.tsx index 5b4a80f7a..3cf198b30 100644 --- a/apps/client/src/components/courthouse/courthouse-posts/manage-courthouse-post-modal.tsx +++ b/apps/client/src/components/courthouse/courthouse-posts/manage-courthouse-post-modal.tsx @@ -4,7 +4,7 @@ import { Loader, Button, TextField } from "@snailycad/ui"; import { FormField } from "components/form/FormField"; import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { useTranslations } from "next-intl"; diff --git a/apps/client/src/components/courthouse/name-change/request-name-change-modal.tsx b/apps/client/src/components/courthouse/name-change/request-name-change-modal.tsx index acf6a5bd0..198438bc3 100644 --- a/apps/client/src/components/courthouse/name-change/request-name-change-modal.tsx +++ b/apps/client/src/components/courthouse/name-change/request-name-change-modal.tsx @@ -2,7 +2,7 @@ import { NAME_CHANGE_REQUEST_SCHEMA } from "@snailycad/schemas"; import { Loader, Button, FormRow, TextField } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { useTranslations } from "next-intl"; diff --git a/apps/client/src/components/dispatch/active-calls/active-calls.tsx b/apps/client/src/components/dispatch/active-calls/active-calls.tsx index 593de5bff..ec21be67a 100644 --- a/apps/client/src/components/dispatch/active-calls/active-calls.tsx +++ b/apps/client/src/components/dispatch/active-calls/active-calls.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { useRouter } from "next/router"; -import { Full911Call, useDispatchState } from "state/dispatch/dispatch-state"; -import { AssignedUnit, WhitelistStatus } from "@snailycad/types"; +import { type Full911Call, useDispatchState } from "state/dispatch/dispatch-state"; +import { type AssignedUnit, WhitelistStatus } from "@snailycad/types"; import { useTranslations } from "use-intl"; import useFetch from "lib/useFetch"; import { useLeoState } from "state/leo-state"; diff --git a/apps/client/src/components/dispatch/active-calls/call-filters.tsx b/apps/client/src/components/dispatch/active-calls/call-filters.tsx index e8ac69dc1..8cc8b02d2 100644 --- a/apps/client/src/components/dispatch/active-calls/call-filters.tsx +++ b/apps/client/src/components/dispatch/active-calls/call-filters.tsx @@ -2,7 +2,7 @@ import * as React from "react"; import type { Full911Call } from "state/dispatch/dispatch-state"; import { makeUnitName } from "lib/utils"; import { useTranslations } from "next-intl"; -import { Loader, SelectField, SelectValue, TextField } from "@snailycad/ui"; +import { Loader, SelectField, type SelectValue, TextField } from "@snailycad/ui"; import { useCallsFilters } from "state/callsFiltersState"; import type { useAsyncTable } from "components/shared/Table"; import { useValues } from "context/ValuesContext"; diff --git a/apps/client/src/components/dispatch/active-calls/columns/assigned-units-column.tsx b/apps/client/src/components/dispatch/active-calls/columns/assigned-units-column.tsx index b987eb979..a2a9fc5e9 100644 --- a/apps/client/src/components/dispatch/active-calls/columns/assigned-units-column.tsx +++ b/apps/client/src/components/dispatch/active-calls/columns/assigned-units-column.tsx @@ -6,7 +6,7 @@ import { useActiveDispatchers } from "hooks/realtime/use-active-dispatchers"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; import { makeUnitName } from "lib/utils"; import { useTranslations } from "next-intl"; -import { Full911Call, useDispatchState } from "state/dispatch/dispatch-state"; +import { type Full911Call, useDispatchState } from "state/dispatch/dispatch-state"; import { DndActions } from "types/dnd-actions"; import { classNames } from "lib/classNames"; diff --git a/apps/client/src/components/dispatch/active-calls/modals/assigned-units-table.tsx b/apps/client/src/components/dispatch/active-calls/modals/assigned-units-table.tsx index 57258102c..5029b8a99 100644 --- a/apps/client/src/components/dispatch/active-calls/modals/assigned-units-table.tsx +++ b/apps/client/src/components/dispatch/active-calls/modals/assigned-units-table.tsx @@ -7,7 +7,7 @@ import useFetch from "lib/useFetch"; import { useCall911State } from "state/dispatch/call-911-state"; import type { Post911CallAssignUnAssign, PUT911CallAssignedUnit } from "@snailycad/types/api"; import { useAuth } from "context/AuthContext"; -import { AssignedUnit, StatusViewMode } from "@snailycad/types"; +import { type AssignedUnit, StatusViewMode } from "@snailycad/types"; import { useTranslations } from "next-intl"; import { Button, FullDate, Loader, SelectField } from "@snailycad/ui"; import { useModal } from "state/modalState"; diff --git a/apps/client/src/components/dispatch/active-calls/modals/manage-911-call-modal.tsx b/apps/client/src/components/dispatch/active-calls/modals/manage-911-call-modal.tsx index 8209f208b..7881c577e 100644 --- a/apps/client/src/components/dispatch/active-calls/modals/manage-911-call-modal.tsx +++ b/apps/client/src/components/dispatch/active-calls/modals/manage-911-call-modal.tsx @@ -11,8 +11,8 @@ import { CallEventsArea } from "../../events/EventsArea"; import { usePermission } from "hooks/usePermission"; import { defaultPermissions } from "@snailycad/permissions"; -import { ActiveOfficer, useLeoState } from "state/leo-state"; -import { ActiveDeputy, useEmsFdState } from "state/ems-fd-state"; +import { type ActiveOfficer, useLeoState } from "state/leo-state"; +import { type ActiveDeputy, useEmsFdState } from "state/ems-fd-state"; import type { Delete911CallByIdData } from "@snailycad/types/api"; import { useCall911State } from "state/dispatch/call-911-state"; import { Manage911CallForm } from "./manage-911-call-form"; diff --git a/apps/client/src/components/dispatch/active-incidents/columns/actions-column.tsx b/apps/client/src/components/dispatch/active-incidents/columns/actions-column.tsx index efd0a41ce..8f2d02fe4 100644 --- a/apps/client/src/components/dispatch/active-incidents/columns/actions-column.tsx +++ b/apps/client/src/components/dispatch/active-incidents/columns/actions-column.tsx @@ -6,7 +6,7 @@ import { useRouter } from "next/router"; import { defaultPermissions } from "@snailycad/permissions"; import type { ActiveOfficer } from "state/leo-state"; import type { ActiveDeputy } from "state/ems-fd-state"; -import { LeoIncident, ShouldDoType } from "@snailycad/types"; +import { type LeoIncident, ShouldDoType } from "@snailycad/types"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "next-intl"; diff --git a/apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx b/apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx index e07bbac23..5fd86d8d0 100644 --- a/apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx +++ b/apps/client/src/components/dispatch/active-units/deputies/active-deputies.tsx @@ -4,12 +4,12 @@ import { Button } from "@snailycad/ui"; import { ManageUnitModal } from "../modals/manage-unit-modal"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; -import { ActiveDeputy, useEmsFdState } from "state/ems-fd-state"; +import { type ActiveDeputy, useEmsFdState } from "state/ems-fd-state"; import { useActiveDeputies } from "hooks/realtime/useActiveDeputies"; import { useRouter } from "next/router"; import { formatUnitDivisions, makeUnitName } from "lib/utils"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; -import { CombinedEmsFdUnit, EmsFdDeputy, StatusViewMode } from "@snailycad/types"; +import { type CombinedEmsFdUnit, type EmsFdDeputy, StatusViewMode } from "@snailycad/types"; import { useAuth } from "context/AuthContext"; import { Table, useAsyncTable, useTableState } from "components/shared/Table"; @@ -26,7 +26,7 @@ import { useMounted } from "@casperiv/useful"; import { generateContrastColor } from "lib/table/get-contrasting-text-color"; import { isUnitCombinedEmsFd } from "@snailycad/utils"; import { MergeUnitModal } from "../modals/merge-unit-modal"; -import { GetEmsFdActiveDeputies } from "@snailycad/types/api"; +import type { GetEmsFdActiveDeputies } from "@snailycad/types/api"; import { ActiveDeputiesHeader } from "./active-deputies-header"; interface Props { diff --git a/apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx b/apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx index 25e542653..7f4fedd84 100644 --- a/apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx +++ b/apps/client/src/components/dispatch/active-units/deputies/deputy-column.tsx @@ -17,7 +17,7 @@ import type { CombinedEmsFdUnit, EmsFdDeputy } from "@snailycad/types"; import { useDispatchState } from "state/dispatch/dispatch-state"; import { isUnitCombinedEmsFd } from "@snailycad/utils"; import { useRouter } from "next/router"; -import { ActiveDeputy, useEmsFdState } from "state/ems-fd-state"; +import { type ActiveDeputy, useEmsFdState } from "state/ems-fd-state"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; diff --git a/apps/client/src/components/dispatch/active-units/modals/manage-unit-modal.tsx b/apps/client/src/components/dispatch/active-units/modals/manage-unit-modal.tsx index 035df03d8..eab2ba3f5 100644 --- a/apps/client/src/components/dispatch/active-units/modals/manage-unit-modal.tsx +++ b/apps/client/src/components/dispatch/active-units/modals/manage-unit-modal.tsx @@ -10,7 +10,12 @@ import { useValues } from "context/ValuesContext"; import { useDispatchState } from "state/dispatch/dispatch-state"; import type { ActiveDeputy } from "state/ems-fd-state"; import { makeUnitName } from "lib/utils"; -import { CombinedLeoUnit, StatusValueType, StatusValue, ValueType } from "@snailycad/types"; +import { + type CombinedLeoUnit, + StatusValueType, + type StatusValue, + ValueType, +} from "@snailycad/types"; import { classNames } from "lib/classNames"; import { useUnitStatusChange } from "hooks/shared/useUnitsStatusChange"; import { isUnitCombined } from "@snailycad/utils"; diff --git a/apps/client/src/components/dispatch/active-units/officers/active-officers.tsx b/apps/client/src/components/dispatch/active-units/officers/active-officers.tsx index 07a1c0078..9763cfa1c 100644 --- a/apps/client/src/components/dispatch/active-units/officers/active-officers.tsx +++ b/apps/client/src/components/dispatch/active-units/officers/active-officers.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import { useTranslations } from "use-intl"; import { Button, HoverCard, HoverCardContent, HoverCardTrigger } from "@snailycad/ui"; -import { ActiveOfficer, useLeoState } from "state/leo-state"; +import { type ActiveOfficer, useLeoState } from "state/leo-state"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { useActiveOfficers } from "hooks/realtime/useActiveOfficers"; @@ -9,7 +9,7 @@ import { useRouter } from "next/router"; import { formatUnitDivisions, makeUnitName } from "lib/utils"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; import { useAuth } from "context/AuthContext"; -import { CombinedLeoUnit, StatusViewMode, Officer } from "@snailycad/types"; +import { type CombinedLeoUnit, StatusViewMode, type Officer } from "@snailycad/types"; import { useActiveDispatchers } from "hooks/realtime/use-active-dispatchers"; import { useTableState, Table, useAsyncTable } from "components/shared/Table"; import { useFeatureEnabled } from "hooks/useFeatureEnabled"; @@ -27,7 +27,7 @@ import dynamic from "next/dynamic"; import { Permissions } from "@snailycad/permissions"; import { usePermission } from "hooks/usePermission"; import { PrivateMessagesModal } from "../private-messages/private-messages-modal"; -import { GetActiveOfficersData } from "@snailycad/types/api"; +import type { GetActiveOfficersData } from "@snailycad/types/api"; import { ActiveOfficersHeader } from "./active-officers-header"; import { classNames } from "lib/classNames"; diff --git a/apps/client/src/components/dispatch/active-units/officers/columns/active-call-column.tsx b/apps/client/src/components/dispatch/active-units/officers/columns/active-call-column.tsx index 756632628..542f966a7 100644 --- a/apps/client/src/components/dispatch/active-units/officers/columns/active-call-column.tsx +++ b/apps/client/src/components/dispatch/active-units/officers/columns/active-call-column.tsx @@ -6,7 +6,7 @@ import { useCall911State } from "state/dispatch/call-911-state"; import dynamic from "next/dynamic"; import { useQuery } from "@tanstack/react-query"; import useFetch from "lib/useFetch"; -import { Get911CallByIdData } from "@snailycad/types/api"; +import type { Get911CallByIdData } from "@snailycad/types/api"; import { classNames } from "lib/classNames"; const Manage911CallModal = dynamic( diff --git a/apps/client/src/components/dispatch/active-units/officers/columns/active-incident-column.tsx b/apps/client/src/components/dispatch/active-units/officers/columns/active-incident-column.tsx index 1c7b7d5b4..d5a128aa6 100644 --- a/apps/client/src/components/dispatch/active-units/officers/columns/active-incident-column.tsx +++ b/apps/client/src/components/dispatch/active-units/officers/columns/active-incident-column.tsx @@ -8,7 +8,7 @@ import { useActiveDispatchers } from "hooks/realtime/use-active-dispatchers"; import dynamic from "next/dynamic"; import { useQuery } from "@tanstack/react-query"; import useFetch from "lib/useFetch"; -import { GetIncidentByIdData } from "@snailycad/types/api"; +import type { GetIncidentByIdData } from "@snailycad/types/api"; import { classNames } from "lib/classNames"; const ManageIncidentModal = dynamic( diff --git a/apps/client/src/components/dispatch/active-units/officers/columns/officer-column.tsx b/apps/client/src/components/dispatch/active-units/officers/columns/officer-column.tsx index 4f415b438..2bfcde3d9 100644 --- a/apps/client/src/components/dispatch/active-units/officers/columns/officer-column.tsx +++ b/apps/client/src/components/dispatch/active-units/officers/columns/officer-column.tsx @@ -6,7 +6,7 @@ import useFetch from "lib/useFetch"; import { useUnitStatusChange } from "hooks/shared/useUnitsStatusChange"; import { isUnitCombined, isUnitOfficer } from "@snailycad/utils"; import { useActiveOfficers } from "hooks/realtime/useActiveOfficers"; -import { ActiveOfficer, useLeoState } from "state/leo-state"; +import { type ActiveOfficer, useLeoState } from "state/leo-state"; import { ArrowRight } from "react-bootstrap-icons"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; diff --git a/apps/client/src/components/dispatch/active-units/private-messages/message-item.tsx b/apps/client/src/components/dispatch/active-units/private-messages/message-item.tsx index 7917ca119..c3506d537 100644 --- a/apps/client/src/components/dispatch/active-units/private-messages/message-item.tsx +++ b/apps/client/src/components/dispatch/active-units/private-messages/message-item.tsx @@ -1,10 +1,10 @@ -import { DispatchChat } from "@snailycad/types"; +import type { DispatchChat } from "@snailycad/types"; import { Button, FullDate } from "@snailycad/ui"; import { isUnitOfficer } from "@snailycad/utils"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; import { classNames } from "lib/classNames"; import { makeUnitName } from "lib/utils"; -import { Full911Call, useCall911State } from "state/dispatch/call-911-state"; +import { type Full911Call, useCall911State } from "state/dispatch/call-911-state"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; diff --git a/apps/client/src/components/dispatch/active-units/private-messages/private-messages-modal.tsx b/apps/client/src/components/dispatch/active-units/private-messages/private-messages-modal.tsx index 3e744285f..8768c4169 100644 --- a/apps/client/src/components/dispatch/active-units/private-messages/private-messages-modal.tsx +++ b/apps/client/src/components/dispatch/active-units/private-messages/private-messages-modal.tsx @@ -5,13 +5,13 @@ import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; import { MessageItem } from "./message-item"; import { SendMessageForm } from "./send-message-form/send-message-form"; -import { DispatchChat } from "@snailycad/types"; +import type { DispatchChat } from "@snailycad/types"; import { useQuery } from "@tanstack/react-query"; import useFetch from "lib/useFetch"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; import { isUnitOfficer } from "@snailycad/utils"; -import { ActiveOfficer } from "state/leo-state"; -import { ActiveDeputy } from "state/ems-fd-state"; +import type { ActiveOfficer } from "state/leo-state"; +import type { ActiveDeputy } from "state/ems-fd-state"; import { makeUnitName } from "lib/utils"; import { SocketEvents } from "@snailycad/config"; import { useListener } from "@casperiv/use-socket.io"; diff --git a/apps/client/src/components/dispatch/active-units/private-messages/send-message-form/add-call-popover.tsx b/apps/client/src/components/dispatch/active-units/private-messages/send-message-form/add-call-popover.tsx index 0becb2406..272169a42 100644 --- a/apps/client/src/components/dispatch/active-units/private-messages/send-message-form/add-call-popover.tsx +++ b/apps/client/src/components/dispatch/active-units/private-messages/send-message-form/add-call-popover.tsx @@ -4,7 +4,7 @@ import { Button, SelectField } from "@snailycad/ui"; import { useTranslations } from "use-intl"; import { useFormikContext } from "formik"; import { useCall911State } from "state/dispatch/call-911-state"; -import { Call911 } from "@snailycad/types"; +import type { Call911 } from "@snailycad/types"; import { ChevronDown } from "react-bootstrap-icons"; export function AddCallPopover() { diff --git a/apps/client/src/components/dispatch/active-units/private-messages/send-message-form/add-incident-popover.tsx b/apps/client/src/components/dispatch/active-units/private-messages/send-message-form/add-incident-popover.tsx index b3f57a31f..acb175252 100644 --- a/apps/client/src/components/dispatch/active-units/private-messages/send-message-form/add-incident-popover.tsx +++ b/apps/client/src/components/dispatch/active-units/private-messages/send-message-form/add-incident-popover.tsx @@ -3,7 +3,7 @@ import * as Popover from "@radix-ui/react-popover"; import { Button, SelectField } from "@snailycad/ui"; import { useTranslations } from "use-intl"; import { useFormikContext } from "formik"; -import { LeoIncident } from "@snailycad/types"; +import type { LeoIncident } from "@snailycad/types"; import { ChevronDown } from "react-bootstrap-icons"; import { useActiveIncidents } from "hooks/realtime/useActiveIncidents"; diff --git a/apps/client/src/components/dispatch/active-units/private-messages/send-message-form/send-message-form.tsx b/apps/client/src/components/dispatch/active-units/private-messages/send-message-form/send-message-form.tsx index a2e2b4308..f30644a96 100644 --- a/apps/client/src/components/dispatch/active-units/private-messages/send-message-form/send-message-form.tsx +++ b/apps/client/src/components/dispatch/active-units/private-messages/send-message-form/send-message-form.tsx @@ -1,7 +1,7 @@ import * as React from "react"; -import { Call911, DispatchChat, LeoIncident } from "@snailycad/types"; +import type { Call911, DispatchChat, LeoIncident } from "@snailycad/types"; import { Button, Loader, TextField } from "@snailycad/ui"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import useFetch from "lib/useFetch"; import { useTranslations } from "use-intl"; import { AddCallPopover } from "./add-call-popover"; diff --git a/apps/client/src/components/dispatch/events/UpdateEventForm.tsx b/apps/client/src/components/dispatch/events/UpdateEventForm.tsx index c5eeee8c2..27e96cc69 100644 --- a/apps/client/src/components/dispatch/events/UpdateEventForm.tsx +++ b/apps/client/src/components/dispatch/events/UpdateEventForm.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { Form, Formik, FormikHelpers, useFormikContext } from "formik"; +import { Form, Formik, type FormikHelpers, useFormikContext } from "formik"; import { Button, Loader, TextField } from "@snailycad/ui"; import type { Call911Event, IncidentEvent } from "@snailycad/types"; import { useTranslations } from "next-intl"; diff --git a/apps/client/src/components/dispatch/map/calls/render-active-map-calls.tsx b/apps/client/src/components/dispatch/map/calls/render-active-map-calls.tsx index e617f2b17..d28803d3c 100644 --- a/apps/client/src/components/dispatch/map/calls/render-active-map-calls.tsx +++ b/apps/client/src/components/dispatch/map/calls/render-active-map-calls.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { icon as leafletIcon, LeafletEvent } from "leaflet"; +import { icon as leafletIcon, type LeafletEvent } from "leaflet"; import useFetch from "lib/useFetch"; import { Marker, Popup, Tooltip, useMap } from "react-leaflet"; import type { Full911Call } from "state/dispatch/dispatch-state"; diff --git a/apps/client/src/components/dispatch/map/modals/select-map-server-modal.tsx b/apps/client/src/components/dispatch/map/modals/select-map-server-modal.tsx index 723686b3f..6e6eb834d 100644 --- a/apps/client/src/components/dispatch/map/modals/select-map-server-modal.tsx +++ b/apps/client/src/components/dispatch/map/modals/select-map-server-modal.tsx @@ -3,9 +3,9 @@ import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; -import { Alert, Button, SelectField, SelectValue } from "@snailycad/ui"; +import { Alert, Button, SelectField, type SelectValue } from "@snailycad/ui"; import { useAuth } from "context/AuthContext"; -import { MiscCadSettings } from "@snailycad/types"; +import type { MiscCadSettings } from "@snailycad/types"; import { useDispatchMapState, useSocketStore } from "state/mapState"; import { toastMessage } from "lib/toastMessage"; import { io } from "socket.io-client"; diff --git a/apps/client/src/components/dispatch/map/render-map-blips.tsx b/apps/client/src/components/dispatch/map/render-map-blips.tsx index 51ae9205f..909b088d3 100644 --- a/apps/client/src/components/dispatch/map/render-map-blips.tsx +++ b/apps/client/src/components/dispatch/map/render-map-blips.tsx @@ -3,7 +3,7 @@ import { icon as leafletIcon } from "leaflet"; import { Marker, Tooltip, useMap } from "react-leaflet"; import { convertToMap } from "lib/map/utils"; import { blipTypes } from "lib/map/blips"; -import { BLIP_SIZES, Blip, BlipsData, MarkerType } from "types/map"; +import { BLIP_SIZES, type Blip, type BlipsData, type MarkerType } from "types/map"; import { MapItem, useDispatchMapState } from "state/mapState"; export function RenderMapBlips() { diff --git a/apps/client/src/components/dispatch/map/smart-signs/use-smart-signs.tsx b/apps/client/src/components/dispatch/map/smart-signs/use-smart-signs.tsx index d71f098b3..ac57ea78f 100644 --- a/apps/client/src/components/dispatch/map/smart-signs/use-smart-signs.tsx +++ b/apps/client/src/components/dispatch/map/smart-signs/use-smart-signs.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { useDispatchMapState, useSocketStore } from "state/mapState"; -import { SmartSignMarker } from "types/map"; +import type { SmartSignMarker } from "types/map"; export function useSmartSigns() { const socket = useSocketStore((state) => state.socket); diff --git a/apps/client/src/components/dispatch/map/units/active-map-units.tsx b/apps/client/src/components/dispatch/map/units/active-map-units.tsx index 4517d9799..369e54fd0 100644 --- a/apps/client/src/components/dispatch/map/units/active-map-units.tsx +++ b/apps/client/src/components/dispatch/map/units/active-map-units.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { CombinedEmsFdUnit, CombinedLeoUnit, EmsFdDeputy, Officer } from "@snailycad/types"; +import type { CombinedEmsFdUnit, CombinedLeoUnit, EmsFdDeputy, Officer } from "@snailycad/types"; import { useActiveDeputies } from "hooks/realtime/useActiveDeputies"; import { useActiveOfficers } from "hooks/realtime/useActiveOfficers"; import type { MapPlayer, PlayerDataEventPayload } from "types/map"; diff --git a/apps/client/src/components/dispatch/modals/tones-modal.tsx b/apps/client/src/components/dispatch/modals/tones-modal.tsx index 4af4931d9..cb7dc704c 100644 --- a/apps/client/src/components/dispatch/modals/tones-modal.tsx +++ b/apps/client/src/components/dispatch/modals/tones-modal.tsx @@ -1,7 +1,7 @@ import { Loader, Button, TextField, SwitchField, FormRow } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import useFetch from "lib/useFetch"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; @@ -12,7 +12,7 @@ import type { DeleteDispatchTonesData, PostDispatchTonesData } from "@snailycad/ import { useGetActiveTone } from "hooks/global/use-tones"; import { Table, useTableState } from "components/shared/Table"; import { CallDescription } from "../active-calls/CallDescription"; -import { ActiveTone, ActiveToneType } from "@snailycad/types"; +import { type ActiveTone, ActiveToneType } from "@snailycad/types"; import { useQueryClient } from "@tanstack/react-query"; interface Props { diff --git a/apps/client/src/components/editor/editor.tsx b/apps/client/src/components/editor/editor.tsx index 273b3307e..fb092575a 100644 --- a/apps/client/src/components/editor/editor.tsx +++ b/apps/client/src/components/editor/editor.tsx @@ -1,11 +1,16 @@ -import { SlateEditor, SlateElements, Text, slateDataToString } from "@snailycad/utils/editor"; +import { + type SlateEditor, + type SlateElements, + type Text, + slateDataToString, +} from "@snailycad/utils/editor"; import * as React from "react"; -import { Editor as _Editor, Node as SlateNode, Descendant, createEditor } from "slate"; +import { Editor as _Editor, Node as SlateNode, type Descendant, createEditor } from "slate"; import { Editable, ReactEditor, - RenderElementProps, - RenderLeafProps, + type RenderElementProps, + type RenderLeafProps, Slate, withReact, } from "slate-react"; diff --git a/apps/client/src/components/editor/elements/checklist-item.tsx b/apps/client/src/components/editor/elements/checklist-item.tsx index bcb67cc83..bbf6eb7f3 100644 --- a/apps/client/src/components/editor/elements/checklist-item.tsx +++ b/apps/client/src/components/editor/elements/checklist-item.tsx @@ -1,7 +1,7 @@ import { classNames } from "lib/classNames"; import { Transforms } from "slate"; import { ReactEditor, useReadOnly, useSlateStatic, type RenderElementProps } from "slate-react"; -import { CheckListItemElement as ICheckListItemElement } from "@snailycad/utils/editor"; +import type { CheckListItemElement as ICheckListItemElement } from "@snailycad/utils/editor"; import { CheckboxField } from "@snailycad/ui"; type Props = RenderElementProps & { element: ICheckListItemElement }; diff --git a/apps/client/src/components/editor/toolbar.tsx b/apps/client/src/components/editor/toolbar.tsx index eaf922fc4..d04ca5b6c 100644 --- a/apps/client/src/components/editor/toolbar.tsx +++ b/apps/client/src/components/editor/toolbar.tsx @@ -17,7 +17,7 @@ import { Button } from "@snailycad/ui"; import { classNames } from "lib/classNames"; import { isBlockActive, toggleMark, toggleBlock, isMarkActive } from "lib/editor/utils"; import { SelectColorPopover } from "./toolbar/select-color-popover"; -import { SlateElements, Text } from "@snailycad/utils/editor"; +import type { SlateElements, Text } from "@snailycad/utils/editor"; /** * mostly example code from: https://github.com/ianstormtaylor/slate/blob/main/site/examples/richtext.tsx diff --git a/apps/client/src/components/ems-fd/ModalButtons.tsx b/apps/client/src/components/ems-fd/ModalButtons.tsx index 5026eae3e..5df616dea 100644 --- a/apps/client/src/components/ems-fd/ModalButtons.tsx +++ b/apps/client/src/components/ems-fd/ModalButtons.tsx @@ -3,7 +3,7 @@ import { ModalIds } from "types/modal-ids"; import { ActiveToneType, ShouldDoType } from "@snailycad/types"; import { useModal } from "state/modalState"; import { useTranslations } from "use-intl"; -import { ActiveDeputy, useEmsFdState } from "state/ems-fd-state"; +import { type ActiveDeputy, useEmsFdState } from "state/ems-fd-state"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; import { makeUnitName } from "lib/utils"; import useFetch from "lib/useFetch"; diff --git a/apps/client/src/components/ems-fd/modals/deputy/manage-deputy-modal.tsx b/apps/client/src/components/ems-fd/modals/deputy/manage-deputy-modal.tsx index 1f2ca5015..17b12ec21 100644 --- a/apps/client/src/components/ems-fd/modals/deputy/manage-deputy-modal.tsx +++ b/apps/client/src/components/ems-fd/modals/deputy/manage-deputy-modal.tsx @@ -6,7 +6,7 @@ import { Select } from "components/form/Select"; import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; import { useValues } from "context/ValuesContext"; -import { Formik, FormikHelpers } from "formik"; +import { Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { ModalIds } from "types/modal-ids"; diff --git a/apps/client/src/components/ems-fd/modals/deputy/select-deputy-modal.tsx b/apps/client/src/components/ems-fd/modals/deputy/select-deputy-modal.tsx index 23772d27a..8820eb623 100644 --- a/apps/client/src/components/ems-fd/modals/deputy/select-deputy-modal.tsx +++ b/apps/client/src/components/ems-fd/modals/deputy/select-deputy-modal.tsx @@ -4,14 +4,14 @@ import { FormField } from "components/form/FormField"; import { Select } from "components/form/Select"; import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; import { useEmsFdState } from "state/ems-fd-state"; import { useValues } from "context/ValuesContext"; -import { EmsFdDeputy, ShouldDoType, WhatPages } from "@snailycad/types"; +import { type EmsFdDeputy, ShouldDoType, WhatPages } from "@snailycad/types"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; import { isUnitDisabled, makeUnitName } from "lib/utils"; import type { PutDispatchStatusByUnitId } from "@snailycad/types/api"; diff --git a/apps/client/src/components/ems-fd/modals/search-medical-records/tabs/doctor-visits-tab.tsx b/apps/client/src/components/ems-fd/modals/search-medical-records/tabs/doctor-visits-tab.tsx index fc06a14bd..0200aa8cf 100644 --- a/apps/client/src/components/ems-fd/modals/search-medical-records/tabs/doctor-visits-tab.tsx +++ b/apps/client/src/components/ems-fd/modals/search-medical-records/tabs/doctor-visits-tab.tsx @@ -1,4 +1,4 @@ -import { PostEmsFdMedicalRecordsSearchData } from "@snailycad/types/api"; +import type { PostEmsFdMedicalRecordsSearchData } from "@snailycad/types/api"; import { Button, FullDate, TabsContent } from "@snailycad/ui"; import { CallDescription } from "components/dispatch/active-calls/CallDescription"; import { Table, useTableState } from "components/shared/Table"; diff --git a/apps/client/src/components/ems-fd/modals/search-medical-records/tabs/medical-records-tab.tsx b/apps/client/src/components/ems-fd/modals/search-medical-records/tabs/medical-records-tab.tsx index 35f78df48..7760ac1a0 100644 --- a/apps/client/src/components/ems-fd/modals/search-medical-records/tabs/medical-records-tab.tsx +++ b/apps/client/src/components/ems-fd/modals/search-medical-records/tabs/medical-records-tab.tsx @@ -1,5 +1,5 @@ -import { MedicalRecord, Value } from "@snailycad/types"; -import { +import type { MedicalRecord, Value } from "@snailycad/types"; +import type { DeleteCitizenMedicalRecordsData, PostEmsFdMedicalRecordsSearchData, } from "@snailycad/types/api"; diff --git a/apps/client/src/components/form/Select.tsx b/apps/client/src/components/form/Select.tsx index b081e69c0..4ab4471a5 100644 --- a/apps/client/src/components/form/Select.tsx +++ b/apps/client/src/components/form/Select.tsx @@ -1,9 +1,9 @@ import { useTranslations } from "use-intl"; import ReactSelect, { - Props as SelectProps, - GroupBase, - StylesConfig, - ActionMeta, + type Props as SelectProps, + type GroupBase, + type StylesConfig, + type ActionMeta, } from "react-select"; import { useAuth } from "context/AuthContext"; import { useModal } from "state/modalState"; diff --git a/apps/client/src/components/form/inputs/ImageSelectInput.tsx b/apps/client/src/components/form/inputs/ImageSelectInput.tsx index 5ab77fff3..188fb1cba 100644 --- a/apps/client/src/components/form/inputs/ImageSelectInput.tsx +++ b/apps/client/src/components/form/inputs/ImageSelectInput.tsx @@ -1,12 +1,12 @@ import * as React from "react"; import { Input, Button } from "@snailycad/ui"; -import { FormikHelpers, useFormikContext } from "formik"; +import { type FormikHelpers, useFormikContext } from "formik"; import { useTranslations } from "next-intl"; import { FormField } from "../FormField"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { CropImageModal } from "components/modal/CropImageModal"; -import { AllowedFileExtension, allowedFileExtensions, IMAGES_REGEX } from "@snailycad/config"; +import { type AllowedFileExtension, allowedFileExtensions, IMAGES_REGEX } from "@snailycad/config"; import Link from "next/link"; import { BoxArrowUpRight } from "react-bootstrap-icons"; import { useDebounce } from "react-use"; diff --git a/apps/client/src/components/form/inputs/value-select-field.tsx b/apps/client/src/components/form/inputs/value-select-field.tsx index b28635b59..9e2d3ca26 100644 --- a/apps/client/src/components/form/inputs/value-select-field.tsx +++ b/apps/client/src/components/form/inputs/value-select-field.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { AnyValue, ValueType } from "@snailycad/types"; +import { type AnyValue, ValueType } from "@snailycad/types"; import { useFormikContext } from "formik"; import { useLoadValuesClientSide } from "hooks/useLoadValuesClientSide"; import { AsyncListSearchField, Item } from "@snailycad/ui"; diff --git a/apps/client/src/components/form/select/MultiValueContainerPenalCode.tsx b/apps/client/src/components/form/select/MultiValueContainerPenalCode.tsx index 17afdfda8..034020687 100644 --- a/apps/client/src/components/form/select/MultiValueContainerPenalCode.tsx +++ b/apps/client/src/components/form/select/MultiValueContainerPenalCode.tsx @@ -1,4 +1,4 @@ -import { components, MultiValueGenericProps } from "react-select"; +import { components, type MultiValueGenericProps } from "react-select"; import type { PenalCode } from "@snailycad/types"; import { dataToSlate, Editor } from "components/editor/editor"; import { HoverCard, HoverCardContent, HoverCardTrigger } from "@snailycad/ui"; diff --git a/apps/client/src/components/form/select/PostalSelect.tsx b/apps/client/src/components/form/select/PostalSelect.tsx index 2bd7bd627..29ec50814 100644 --- a/apps/client/src/components/form/select/PostalSelect.tsx +++ b/apps/client/src/components/form/select/PostalSelect.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { AddressValue, ValueType } from "@snailycad/types"; +import { type AddressValue, ValueType } from "@snailycad/types"; import { useValues } from "context/ValuesContext"; import { useFormikContext } from "formik"; import { useLoadValuesClientSide } from "hooks/useLoadValuesClientSide"; diff --git a/apps/client/src/components/leo/ModalButtons.tsx b/apps/client/src/components/leo/ModalButtons.tsx index b8591890c..99edc6d11 100644 --- a/apps/client/src/components/leo/ModalButtons.tsx +++ b/apps/client/src/components/leo/ModalButtons.tsx @@ -1,5 +1,5 @@ import { Button } from "@snailycad/ui"; -import { ActiveOfficer, useLeoState } from "state/leo-state"; +import { type ActiveOfficer, useLeoState } from "state/leo-state"; import { ActiveToneType, ShouldDoType } from "@snailycad/types"; import { useTranslations } from "use-intl"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; diff --git a/apps/client/src/components/leo/UnitDepartmentStatus.tsx b/apps/client/src/components/leo/UnitDepartmentStatus.tsx index ac87c12fc..127b3f5ca 100644 --- a/apps/client/src/components/leo/UnitDepartmentStatus.tsx +++ b/apps/client/src/components/leo/UnitDepartmentStatus.tsx @@ -1,4 +1,4 @@ -import { EmsFdDeputy, Officer, WhitelistStatus } from "@snailycad/types"; +import { type EmsFdDeputy, type Officer, WhitelistStatus } from "@snailycad/types"; import { Button, HoverCard, HoverCardContent, HoverCardTrigger, Status } from "@snailycad/ui"; import { useTranslations } from "next-intl"; import { Info } from "react-bootstrap-icons"; diff --git a/apps/client/src/components/leo/active-warrants/active-warrants.tsx b/apps/client/src/components/leo/active-warrants/active-warrants.tsx index a542969c2..b0769e85c 100644 --- a/apps/client/src/components/leo/active-warrants/active-warrants.tsx +++ b/apps/client/src/components/leo/active-warrants/active-warrants.tsx @@ -12,7 +12,7 @@ import { isUnitCombined } from "@snailycad/utils"; import { CallDescription } from "components/dispatch/active-calls/CallDescription"; import { Permissions, usePermission } from "hooks/usePermission"; import dynamic from "next/dynamic"; -import { GetActiveWarrantsData } from "@snailycad/types/api"; +import type { GetActiveWarrantsData } from "@snailycad/types/api"; const CreateWarrantModal = dynamic( async () => (await import("../modals/CreateWarrantModal")).CreateWarrantModal, diff --git a/apps/client/src/components/leo/call-history/link-call-to-citizen-modal.tsx b/apps/client/src/components/leo/call-history/link-call-to-citizen-modal.tsx index 97181471c..181510985 100644 --- a/apps/client/src/components/leo/call-history/link-call-to-citizen-modal.tsx +++ b/apps/client/src/components/leo/call-history/link-call-to-citizen-modal.tsx @@ -1,7 +1,7 @@ import { LINK_INCIDENT_TO_CALL_SCHEMA } from "@snailycad/schemas"; import { Loader, Button } from "@snailycad/ui"; import { FormField } from "components/form/FormField"; -import { Select, SelectValue } from "components/form/Select"; +import { Select, type SelectValue } from "components/form/Select"; import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; import { Form, Formik } from "formik"; diff --git a/apps/client/src/components/leo/citizen-logs/arrest-reports-tab.tsx b/apps/client/src/components/leo/citizen-logs/arrest-reports-tab.tsx index a587dfa90..06223fa80 100644 --- a/apps/client/src/components/leo/citizen-logs/arrest-reports-tab.tsx +++ b/apps/client/src/components/leo/citizen-logs/arrest-reports-tab.tsx @@ -9,7 +9,7 @@ import { Status, TabsContent, } from "@snailycad/ui"; -import { Record, RecordType } from "@snailycad/types"; +import { type Record, RecordType } from "@snailycad/types"; import { Table, useAsyncTable, useTableState } from "components/shared/Table"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; import { makeUnitName } from "lib/utils"; diff --git a/apps/client/src/components/leo/exams/manage-license-exam-modal.tsx b/apps/client/src/components/leo/exams/manage-license-exam-modal.tsx index 1d2faee51..631ee467c 100644 --- a/apps/client/src/components/leo/exams/manage-license-exam-modal.tsx +++ b/apps/client/src/components/leo/exams/manage-license-exam-modal.tsx @@ -1,6 +1,6 @@ import { LICENSE_EXAM_SCHEMA } from "@snailycad/schemas"; import { - LicenseExam, + type LicenseExam, LicenseExamPassType, DriversLicenseCategoryType, ValueLicenseType, diff --git a/apps/client/src/components/leo/incidents/involved-units/involved-units-table.tsx b/apps/client/src/components/leo/incidents/involved-units/involved-units-table.tsx index ccdd7faaa..315df4754 100644 --- a/apps/client/src/components/leo/incidents/involved-units/involved-units-table.tsx +++ b/apps/client/src/components/leo/incidents/involved-units/involved-units-table.tsx @@ -4,7 +4,12 @@ import { makeUnitName } from "lib/utils"; import useFetch from "lib/useFetch"; import type { PutIncidentByIdData } from "@snailycad/types/api"; import { useAuth } from "context/AuthContext"; -import { EmsFdIncident, IncidentInvolvedUnit, LeoIncident, StatusViewMode } from "@snailycad/types"; +import { + type EmsFdIncident, + type IncidentInvolvedUnit, + type LeoIncident, + StatusViewMode, +} from "@snailycad/types"; import { useTranslations } from "next-intl"; import { Button, FullDate, Loader } from "@snailycad/ui"; import { useModal } from "state/modalState"; diff --git a/apps/client/src/components/leo/incidents/manage-incident-modal.tsx b/apps/client/src/components/leo/incidents/manage-incident-modal.tsx index 3610c22d7..137658fd1 100644 --- a/apps/client/src/components/leo/incidents/manage-incident-modal.tsx +++ b/apps/client/src/components/leo/incidents/manage-incident-modal.tsx @@ -22,7 +22,7 @@ import { dataToSlate, Editor } from "components/editor/editor"; import { IncidentEventsArea } from "./IncidentEventsArea"; import { classNames } from "lib/classNames"; import { useActiveIncidents } from "hooks/realtime/useActiveIncidents"; -import { EmsFdIncident, LeoIncident, StatusValueType, ValueType } from "@snailycad/types"; +import { type EmsFdIncident, type LeoIncident, StatusValueType, ValueType } from "@snailycad/types"; import { useValues } from "context/ValuesContext"; import type { PostIncidentsData, PutIncidentByIdData } from "@snailycad/types/api"; import { AddressPostalSelect } from "components/form/select/PostalSelect"; @@ -30,8 +30,8 @@ import { InvolvedUnitsTable } from "./involved-units/involved-units-table"; import { ValueSelectField } from "components/form/inputs/value-select-field"; import { useAuth } from "context/AuthContext"; import { useActiveDispatchers } from "hooks/realtime/use-active-dispatchers"; -import { ActiveOfficer, useLeoState } from "state/leo-state"; -import { ActiveDeputy, useEmsFdState } from "state/ems-fd-state"; +import { type ActiveOfficer, useLeoState } from "state/leo-state"; +import { type ActiveDeputy, useEmsFdState } from "state/ems-fd-state"; interface Props { incident?: T | null; diff --git a/apps/client/src/components/leo/jail/release-citizen-modal.tsx b/apps/client/src/components/leo/jail/release-citizen-modal.tsx index 1dd7f8cab..43a5a7fe5 100644 --- a/apps/client/src/components/leo/jail/release-citizen-modal.tsx +++ b/apps/client/src/components/leo/jail/release-citizen-modal.tsx @@ -1,11 +1,11 @@ import { Modal } from "components/modal/Modal"; import { Button, Loader, SelectField } from "@snailycad/ui"; import useFetch from "lib/useFetch"; -import { BaseCitizen, Record, ReleaseType } from "@snailycad/types"; +import { type BaseCitizen, type Record, ReleaseType } from "@snailycad/types"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "next-intl"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import type { DeleteReleaseJailedCitizenData } from "@snailycad/types/api"; import { CitizenSuggestionsField } from "components/shared/CitizenSuggestionsField"; diff --git a/apps/client/src/components/leo/modals/CreateWarrantModal.tsx b/apps/client/src/components/leo/modals/CreateWarrantModal.tsx index d833af871..099204737 100644 --- a/apps/client/src/components/leo/modals/CreateWarrantModal.tsx +++ b/apps/client/src/components/leo/modals/CreateWarrantModal.tsx @@ -1,4 +1,4 @@ -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { useTranslations } from "use-intl"; import { Loader, Button, SelectField, TextField } from "@snailycad/ui"; import useFetch from "lib/useFetch"; diff --git a/apps/client/src/components/leo/modals/CustomFieldSearch/CustomFieldResults.tsx b/apps/client/src/components/leo/modals/CustomFieldSearch/CustomFieldResults.tsx index 4f56e505b..9792ae9c5 100644 --- a/apps/client/src/components/leo/modals/CustomFieldSearch/CustomFieldResults.tsx +++ b/apps/client/src/components/leo/modals/CustomFieldSearch/CustomFieldResults.tsx @@ -4,9 +4,9 @@ import { Button } from "@snailycad/ui"; import { Table, useTableState } from "components/shared/Table"; import { useModal } from "state/modalState"; import { useTranslations } from "next-intl"; -import { NameSearchResult, useNameSearch } from "state/search/name-search-state"; -import { useVehicleSearch, VehicleSearchResult } from "state/search/vehicle-search-state"; -import { useWeaponSearch, WeaponSearchResult } from "state/search/weapon-search-state"; +import { type NameSearchResult, useNameSearch } from "state/search/name-search-state"; +import { useVehicleSearch, type VehicleSearchResult } from "state/search/vehicle-search-state"; +import { useWeaponSearch, type WeaponSearchResult } from "state/search/weapon-search-state"; import { ModalIds } from "types/modal-ids"; import type { CustomFieldResults } from "./CustomFieldSearch"; diff --git a/apps/client/src/components/leo/modals/ManageOfficerModal.tsx b/apps/client/src/components/leo/modals/ManageOfficerModal.tsx index cd704b484..7ed082302 100644 --- a/apps/client/src/components/leo/modals/ManageOfficerModal.tsx +++ b/apps/client/src/components/leo/modals/ManageOfficerModal.tsx @@ -3,7 +3,7 @@ import { CREATE_OFFICER_SCHEMA } from "@snailycad/schemas"; import { Loader, Button } from "@snailycad/ui"; import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; -import { Formik, FormikHelpers } from "formik"; +import { Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { ModalIds } from "types/modal-ids"; diff --git a/apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx b/apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx index 2579b7de4..bf65472de 100644 --- a/apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx +++ b/apps/client/src/components/leo/modals/NameSearchModal/NameSearchModal.tsx @@ -6,17 +6,17 @@ import { Form, Formik, useFormikContext } from "formik"; import useFetch from "lib/useFetch"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; -import { CustomFieldCategory, Citizen, BoloType } from "@snailycad/types"; +import { CustomFieldCategory, type Citizen, BoloType } from "@snailycad/types"; import format from "date-fns/format"; import { NameSearchTabsContainer } from "./tabs/tabs-container"; -import { NameSearchResult, useNameSearch } from "state/search/name-search-state"; +import { type NameSearchResult, useNameSearch } from "state/search/name-search-state"; import { useRouter } from "next/router"; import { ArrowLeft, PersonFill } from "react-bootstrap-icons"; import { useImageUrl } from "hooks/useImageUrl"; import { useFeatureEnabled } from "hooks/useFeatureEnabled"; import dynamic from "next/dynamic"; import { - LicenseInitialValues, + type LicenseInitialValues, ManageLicensesModal, } from "components/citizen/licenses/manage-licenses-modal"; import { ManageCitizenFlagsModal } from "./ManageCitizenFlagsModal"; diff --git a/apps/client/src/components/leo/modals/NameSearchModal/sections/license-points/manage-license-points-modal.tsx b/apps/client/src/components/leo/modals/NameSearchModal/sections/license-points/manage-license-points-modal.tsx index e10afae4f..565277a0e 100644 --- a/apps/client/src/components/leo/modals/NameSearchModal/sections/license-points/manage-license-points-modal.tsx +++ b/apps/client/src/components/leo/modals/NameSearchModal/sections/license-points/manage-license-points-modal.tsx @@ -8,7 +8,7 @@ import { Button, Loader, TextField } from "@snailycad/ui"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { useNameSearch } from "state/search/name-search-state"; -import { PutSearchActionsLicensePointsData } from "@snailycad/types/api"; +import type { PutSearchActionsLicensePointsData } from "@snailycad/types/api"; import { toastMessage } from "lib/toastMessage"; export function ManageLicensePointsModal() { diff --git a/apps/client/src/components/leo/modals/NameSearchModal/tabs/records-tab.tsx b/apps/client/src/components/leo/modals/NameSearchModal/tabs/records-tab.tsx index 51bb3b6f4..244f146dc 100644 --- a/apps/client/src/components/leo/modals/NameSearchModal/tabs/records-tab.tsx +++ b/apps/client/src/components/leo/modals/NameSearchModal/tabs/records-tab.tsx @@ -1,7 +1,7 @@ import * as React from "react"; import compareDesc from "date-fns/compareDesc"; import { useRouter } from "next/router"; -import { PaymentStatus, Record, RecordType } from "@snailycad/types"; +import { PaymentStatus, type Record, RecordType } from "@snailycad/types"; import { useTranslations } from "use-intl"; import { Button, FullDate, Loader, Status, TabsContent } from "@snailycad/ui"; import { ModalIds } from "types/modal-ids"; diff --git a/apps/client/src/components/leo/modals/NameSearchModal/tabs/vehicles-tab.tsx b/apps/client/src/components/leo/modals/NameSearchModal/tabs/vehicles-tab.tsx index 0a84f039d..91e8de79b 100644 --- a/apps/client/src/components/leo/modals/NameSearchModal/tabs/vehicles-tab.tsx +++ b/apps/client/src/components/leo/modals/NameSearchModal/tabs/vehicles-tab.tsx @@ -2,7 +2,7 @@ import { Table, useTableState } from "components/shared/Table"; import { useFeatureEnabled } from "hooks/useFeatureEnabled"; import { useTranslations } from "use-intl"; import { Button, FullDate, Status, TabsContent } from "@snailycad/ui"; -import { useVehicleSearch, VehicleSearchResult } from "state/search/vehicle-search-state"; +import { useVehicleSearch, type VehicleSearchResult } from "state/search/vehicle-search-state"; import { useModal } from "state/modalState"; import { useNameSearch } from "state/search/name-search-state"; import { ModalIds } from "types/modal-ids"; diff --git a/apps/client/src/components/leo/modals/NameSearchModal/tabs/warrants-tab.tsx b/apps/client/src/components/leo/modals/NameSearchModal/tabs/warrants-tab.tsx index 8e87fed01..841245c9a 100644 --- a/apps/client/src/components/leo/modals/NameSearchModal/tabs/warrants-tab.tsx +++ b/apps/client/src/components/leo/modals/NameSearchModal/tabs/warrants-tab.tsx @@ -9,7 +9,7 @@ import { useNameSearch } from "state/search/name-search-state"; import { makeUnitName } from "lib/utils"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; import { Table, useTableState } from "components/shared/Table"; -import { Warrant, WarrantStatus } from "@snailycad/types"; +import { type Warrant, WarrantStatus } from "@snailycad/types"; import type { DeleteRecordsByIdData, PutWarrantsData } from "@snailycad/types/api"; import { Permissions, usePermission } from "hooks/usePermission"; import { useFeatureEnabled } from "hooks/useFeatureEnabled"; diff --git a/apps/client/src/components/leo/modals/VehicleSearchModal.tsx b/apps/client/src/components/leo/modals/VehicleSearchModal.tsx index 681cc064d..f85016e28 100644 --- a/apps/client/src/components/leo/modals/VehicleSearchModal.tsx +++ b/apps/client/src/components/leo/modals/VehicleSearchModal.tsx @@ -6,9 +6,9 @@ import { Form, Formik, useFormikContext } from "formik"; import useFetch from "lib/useFetch"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; -import { BoloType, CustomFieldCategory, RegisteredVehicle } from "@snailycad/types"; +import { BoloType, CustomFieldCategory, type RegisteredVehicle } from "@snailycad/types"; import { useRouter } from "next/router"; -import { useVehicleSearch, VehicleSearchResult } from "state/search/vehicle-search-state"; +import { useVehicleSearch, type VehicleSearchResult } from "state/search/vehicle-search-state"; import { ManageVehicleFlagsModal } from "./VehicleSearch/ManageVehicleFlagsModal"; import { ManageVehicleLicensesModal } from "./VehicleSearch/ManageVehicleLicensesModal"; import { ManageCustomFieldsModal } from "./NameSearchModal/ManageCustomFieldsModal"; diff --git a/apps/client/src/components/leo/modals/business-search-modal/business-search-modal.tsx b/apps/client/src/components/leo/modals/business-search-modal/business-search-modal.tsx index 263ea3b52..b2f086d67 100644 --- a/apps/client/src/components/leo/modals/business-search-modal/business-search-modal.tsx +++ b/apps/client/src/components/leo/modals/business-search-modal/business-search-modal.tsx @@ -10,7 +10,7 @@ import { Table, useTableState } from "components/shared/Table"; import { formatCitizenAddress } from "lib/utils"; import type { PostLeoSearchBusinessData } from "@snailycad/types/api"; import type { BaseCitizen } from "@snailycad/types"; -import { BusinessSearchResult, useBusinessSearch } from "state/search/business-search-state"; +import { type BusinessSearchResult, useBusinessSearch } from "state/search/business-search-state"; import dynamic from "next/dynamic"; const BusinessSearchTabsContainer = dynamic( diff --git a/apps/client/src/components/leo/modals/manage-record/select-penal-code.tsx b/apps/client/src/components/leo/modals/manage-record/select-penal-code.tsx index 11a9b4ca5..d0a2e6e44 100644 --- a/apps/client/src/components/leo/modals/manage-record/select-penal-code.tsx +++ b/apps/client/src/components/leo/modals/manage-record/select-penal-code.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { Select, SelectValue } from "components/form/Select"; +import { Select, type SelectValue } from "components/form/Select"; import type { PenalCode } from "@snailycad/types"; import { FormRow } from "@snailycad/ui"; import { usePenalCodeGroups } from "hooks/values/use-penal-code-groups"; diff --git a/apps/client/src/components/leo/modals/manage-record/tabs/connections-tab/connections-tab.tsx b/apps/client/src/components/leo/modals/manage-record/tabs/connections-tab/connections-tab.tsx index b15fb19e2..0f1e5127f 100644 --- a/apps/client/src/components/leo/modals/manage-record/tabs/connections-tab/connections-tab.tsx +++ b/apps/client/src/components/leo/modals/manage-record/tabs/connections-tab/connections-tab.tsx @@ -10,7 +10,7 @@ import { useTranslations } from "use-intl"; import dynamic from "next/dynamic"; import type { Call911, Record } from "@snailycad/types"; -import { Get911CallsData } from "@snailycad/types/api"; +import type { Get911CallsData } from "@snailycad/types/api"; const ManageIncidentModal = dynamic( async () => (await import("components/leo/incidents/manage-incident-modal")).ManageIncidentModal, diff --git a/apps/client/src/components/leo/modals/select-officer-modal.tsx b/apps/client/src/components/leo/modals/select-officer-modal.tsx index 41a1b40d9..bc4dc4694 100644 --- a/apps/client/src/components/leo/modals/select-officer-modal.tsx +++ b/apps/client/src/components/leo/modals/select-officer-modal.tsx @@ -4,14 +4,19 @@ import { FormField } from "components/form/FormField"; import { Select } from "components/form/Select"; import { Modal } from "components/modal/Modal"; import { useModal } from "state/modalState"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { handleValidate } from "lib/handleValidate"; import useFetch from "lib/useFetch"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; import { useLeoState } from "state/leo-state"; import { useValues } from "context/ValuesContext"; -import { EmergencyVehicleValue, Officer, ShouldDoType, WhatPages } from "@snailycad/types"; +import { + type EmergencyVehicleValue, + type Officer, + ShouldDoType, + WhatPages, +} from "@snailycad/types"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; import { isUnitDisabled, makeUnitName } from "lib/utils"; import type { PutDispatchStatusByUnitId } from "@snailycad/types/api"; diff --git a/apps/client/src/components/leo/modals/weapon-search-modal.tsx b/apps/client/src/components/leo/modals/weapon-search-modal.tsx index e7641b1c6..74dbfa0e4 100644 --- a/apps/client/src/components/leo/modals/weapon-search-modal.tsx +++ b/apps/client/src/components/leo/modals/weapon-search-modal.tsx @@ -6,7 +6,7 @@ import { Form, Formik } from "formik"; import useFetch from "lib/useFetch"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; -import { useWeaponSearch, WeaponSearchResult } from "state/search/weapon-search-state"; +import { useWeaponSearch, type WeaponSearchResult } from "state/search/weapon-search-state"; import { CustomFieldsArea } from "./CustomFieldsArea"; import { useRouter } from "next/router"; import { ManageCustomFieldsModal } from "./NameSearchModal/ManageCustomFieldsModal"; diff --git a/apps/client/src/components/leo/private-messages/private-messages-button.tsx b/apps/client/src/components/leo/private-messages/private-messages-button.tsx index 680eccf74..e79e0e687 100644 --- a/apps/client/src/components/leo/private-messages/private-messages-button.tsx +++ b/apps/client/src/components/leo/private-messages/private-messages-button.tsx @@ -1,12 +1,12 @@ import { useListener } from "@casperiv/use-socket.io"; import { SocketEvents } from "@snailycad/config"; -import { DispatchChat } from "@snailycad/types"; +import type { DispatchChat } from "@snailycad/types"; import { Button } from "@snailycad/ui"; import { useQuery } from "@tanstack/react-query"; import { toastMessage } from "lib/toastMessage"; import useFetch from "lib/useFetch"; -import { ActiveDeputy } from "state/ems-fd-state"; -import { ActiveOfficer } from "state/leo-state"; +import type { ActiveDeputy } from "state/ems-fd-state"; +import type { ActiveOfficer } from "state/leo-state"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { useTranslations } from "use-intl"; diff --git a/apps/client/src/components/leo/qualifications/UnitQualificationsTable.tsx b/apps/client/src/components/leo/qualifications/UnitQualificationsTable.tsx index 398f0e54d..e534c3a0e 100644 --- a/apps/client/src/components/leo/qualifications/UnitQualificationsTable.tsx +++ b/apps/client/src/components/leo/qualifications/UnitQualificationsTable.tsx @@ -1,4 +1,9 @@ -import { EmsFdDeputy, Officer, QualificationValueType, UnitQualification } from "@snailycad/types"; +import { + type EmsFdDeputy, + type Officer, + QualificationValueType, + type UnitQualification, +} from "@snailycad/types"; import { FullDate } from "@snailycad/ui"; import { QualificationsHoverCard } from "components/admin/manage/units/QualificationHoverCard"; import { Table, useTableState } from "components/shared/Table"; diff --git a/apps/client/src/components/leo/records-stats-column.tsx b/apps/client/src/components/leo/records-stats-column.tsx index ddd348b69..20ed4bf3f 100644 --- a/apps/client/src/components/leo/records-stats-column.tsx +++ b/apps/client/src/components/leo/records-stats-column.tsx @@ -1,4 +1,4 @@ -import { Record, Violation } from "@snailycad/types"; +import type { Record, Violation } from "@snailycad/types"; import { useTranslations } from "use-intl"; interface Props { diff --git a/apps/client/src/components/modal/AlertModal.tsx b/apps/client/src/components/modal/AlertModal.tsx index f095d87ce..e4a1a20bc 100644 --- a/apps/client/src/components/modal/AlertModal.tsx +++ b/apps/client/src/components/modal/AlertModal.tsx @@ -3,7 +3,7 @@ import { Loader, Button } from "@snailycad/ui"; import { classNames } from "lib/classNames"; import { useModal } from "state/modalState"; import { useTranslations } from "use-intl"; -import { Modal, ModalProps } from "./Modal"; +import { Modal, type ModalProps } from "./Modal"; import type { ModalIds } from "types/modal-ids"; type Props = Pick & { diff --git a/apps/client/src/components/shared/image-wrapper.tsx b/apps/client/src/components/shared/image-wrapper.tsx index 27386737c..a8d7cd870 100644 --- a/apps/client/src/components/shared/image-wrapper.tsx +++ b/apps/client/src/components/shared/image-wrapper.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import Image, { ImageProps } from "next/image"; +import Image, { type ImageProps } from "next/image"; interface Props extends ImageProps { fallback?: React.ReactNode; diff --git a/apps/client/src/components/shared/table/skeleton-loader.tsx b/apps/client/src/components/shared/table/skeleton-loader.tsx index 18bf8e01f..1082353ca 100644 --- a/apps/client/src/components/shared/table/skeleton-loader.tsx +++ b/apps/client/src/components/shared/table/skeleton-loader.tsx @@ -1,5 +1,5 @@ import { classNames } from "lib/classNames"; -import { _RowData } from "./table"; +import type { _RowData } from "./table"; interface TableSkeletonLoaderProps { tableHeaders?: { id: string }[]; diff --git a/apps/client/src/components/shared/table/table-header.tsx b/apps/client/src/components/shared/table/table-header.tsx index e3adb5794..5b13500ad 100644 --- a/apps/client/src/components/shared/table/table-header.tsx +++ b/apps/client/src/components/shared/table/table-header.tsx @@ -6,7 +6,7 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@snailycad/ui"; -import { Column, flexRender, Header, RowData } from "@tanstack/react-table"; +import { type Column, flexRender, type Header, type RowData } from "@tanstack/react-table"; import { classNames } from "lib/classNames"; import { ArrowDownSquareFill, Check, ThreeDots } from "react-bootstrap-icons"; diff --git a/apps/client/src/components/shared/table/table-row.tsx b/apps/client/src/components/shared/table/table-row.tsx index 227d64ba3..4bde21773 100644 --- a/apps/client/src/components/shared/table/table-row.tsx +++ b/apps/client/src/components/shared/table/table-row.tsx @@ -1,6 +1,6 @@ import { ErrorBoundary } from "@sentry/nextjs"; import { TableActionsAlignment } from "@snailycad/types"; -import { Cell, flexRender, Row, RowData } from "@tanstack/react-table"; +import { type Cell, flexRender, type Row, type RowData } from "@tanstack/react-table"; import { classNames } from "lib/classNames"; interface Props { diff --git a/apps/client/src/components/shared/table/table.tsx b/apps/client/src/components/shared/table/table.tsx index 16e4c6d31..d69c1102c 100644 --- a/apps/client/src/components/shared/table/table.tsx +++ b/apps/client/src/components/shared/table/table.tsx @@ -2,12 +2,12 @@ import * as React from "react"; import { getCoreRowModel, getSortedRowModel, - RowData, + type RowData, useReactTable, - Header, + type Header, getFilteredRowModel, - Row, - AccessorKeyColumnDef, + type Row, + type AccessorKeyColumnDef, } from "@tanstack/react-table"; import { TableRow } from "./table-row"; import { TablePagination } from "./table-pagination"; diff --git a/apps/client/src/components/shared/utility-panel/statuses-area.tsx b/apps/client/src/components/shared/utility-panel/statuses-area.tsx index ef0eee48a..1f4d0a48c 100644 --- a/apps/client/src/components/shared/utility-panel/statuses-area.tsx +++ b/apps/client/src/components/shared/utility-panel/statuses-area.tsx @@ -11,10 +11,10 @@ import type { ActiveDeputy } from "state/ems-fd-state"; import type { ActiveOfficer } from "state/leo-state"; import { ModalIds } from "types/modal-ids"; import { - CombinedEmsFdUnit, - CombinedLeoUnit, - EmsFdDeputy, - Officer, + type CombinedEmsFdUnit, + type CombinedLeoUnit, + type EmsFdDeputy, + type Officer, ShouldDoType, WhatPages, type StatusValue, diff --git a/apps/client/src/context/AuthContext.tsx b/apps/client/src/context/AuthContext.tsx index df42e6954..645816a62 100644 --- a/apps/client/src/context/AuthContext.tsx +++ b/apps/client/src/context/AuthContext.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { useRouter } from "next/router"; -import { type cad as CAD, type User, WhitelistStatus, Rank, ApiToken } from "@snailycad/types"; +import { type cad as CAD, type User, WhitelistStatus, Rank, type ApiToken } from "@snailycad/types"; import { useIsRouteFeatureEnabled } from "../hooks/auth/useIsRouteFeatureEnabled"; import { useListener } from "@casperiv/use-socket.io"; import { SocketEvents } from "@snailycad/config"; diff --git a/apps/client/src/hooks/global/use-tones.tsx b/apps/client/src/hooks/global/use-tones.tsx index 785d7cb5f..9c225dedf 100644 --- a/apps/client/src/hooks/global/use-tones.tsx +++ b/apps/client/src/hooks/global/use-tones.tsx @@ -4,7 +4,7 @@ import { SocketEvents } from "@snailycad/config"; import { useTranslations } from "use-intl"; import { useAudio } from "react-use"; import { useRouter } from "next/router"; -import { ActiveTone, ActiveToneType } from "@snailycad/types"; +import { type ActiveTone, ActiveToneType } from "@snailycad/types"; import { useQuery } from "@tanstack/react-query"; import type { GETDispatchTonesData } from "@snailycad/types/api"; import useFetch from "lib/useFetch"; diff --git a/apps/client/src/hooks/realtime/use-active-incidents-table.ts b/apps/client/src/hooks/realtime/use-active-incidents-table.ts index 121471bc5..898a1ac37 100644 --- a/apps/client/src/hooks/realtime/use-active-incidents-table.ts +++ b/apps/client/src/hooks/realtime/use-active-incidents-table.ts @@ -3,7 +3,7 @@ import type { GetIncidentsData } from "@snailycad/types/api"; import { SocketEvents } from "@snailycad/config"; import { useListener } from "@casperiv/use-socket.io"; import { useAsyncTable } from "components/shared/Table"; -import { LeoIncident } from "@snailycad/types"; +import type { LeoIncident } from "@snailycad/types"; import { useDispatchState } from "state/dispatch/dispatch-state"; export function useActiveIncidentsTable() { diff --git a/apps/client/src/hooks/realtime/use-active-warrants.ts b/apps/client/src/hooks/realtime/use-active-warrants.ts index 67d64b6ee..99c5636ca 100644 --- a/apps/client/src/hooks/realtime/use-active-warrants.ts +++ b/apps/client/src/hooks/realtime/use-active-warrants.ts @@ -1,5 +1,5 @@ import * as React from "react"; -import { ActiveWarrant } from "state/leo-state"; +import type { ActiveWarrant } from "state/leo-state"; import type { GetActiveWarrantsData } from "@snailycad/types/api"; import { SocketEvents } from "@snailycad/config"; import { useListener } from "@casperiv/use-socket.io"; diff --git a/apps/client/src/hooks/shared/table/use-async-table.ts b/apps/client/src/hooks/shared/table/use-async-table.ts index a9813b100..574e88b8f 100644 --- a/apps/client/src/hooks/shared/table/use-async-table.ts +++ b/apps/client/src/hooks/shared/table/use-async-table.ts @@ -1,7 +1,7 @@ import * as React from "react"; import useFetch from "lib/useFetch"; import { useDebounce } from "react-use"; -import { useQuery, QueryFunctionContext } from "@tanstack/react-query"; +import { useQuery, type QueryFunctionContext } from "@tanstack/react-query"; import { useList } from "./use-list"; interface FetchOptions { diff --git a/apps/client/src/hooks/shared/useUnitsStatusChange.ts b/apps/client/src/hooks/shared/useUnitsStatusChange.ts index 8df4724a7..abf1289ac 100644 --- a/apps/client/src/hooks/shared/useUnitsStatusChange.ts +++ b/apps/client/src/hooks/shared/useUnitsStatusChange.ts @@ -1,5 +1,5 @@ import * as React from "react"; -import { StatusValue, StatusValueType, ShouldDoType } from "@snailycad/types"; +import { type StatusValue, StatusValueType, ShouldDoType } from "@snailycad/types"; import useFetch from "lib/useFetch"; import type { PutDispatchStatusByUnitId } from "@snailycad/types/api"; diff --git a/apps/client/src/hooks/useFeatureEnabled.ts b/apps/client/src/hooks/useFeatureEnabled.ts index 7150e5c2f..4cad7351a 100644 --- a/apps/client/src/hooks/useFeatureEnabled.ts +++ b/apps/client/src/hooks/useFeatureEnabled.ts @@ -1,5 +1,5 @@ import * as React from "react"; -import { CadFeatureOptions, CourthouseType, Feature, LicenseExamType } from "@snailycad/types"; +import { type CadFeatureOptions, CourthouseType, Feature, LicenseExamType } from "@snailycad/types"; import { useAuth } from "context/AuthContext"; export const DEFAULT_DISABLED_FEATURES = { diff --git a/apps/client/src/lib/admin/values/values.tsx b/apps/client/src/lib/admin/values/values.tsx index 99a1b8e11..16a74ddf5 100644 --- a/apps/client/src/lib/admin/values/values.tsx +++ b/apps/client/src/lib/admin/values/values.tsx @@ -10,11 +10,11 @@ import { type VehicleValue, type Value, ShouldDoType, - QualificationValue, - CallTypeValue, + type QualificationValue, + type CallTypeValue, type AnyValue, - AddressValue, - DriversLicenseCategoryValue, + type AddressValue, + type DriversLicenseCategoryValue, } from "@snailycad/types"; import { SHOULD_DO_LABELS, diff --git a/apps/client/src/lib/editor/utils.ts b/apps/client/src/lib/editor/utils.ts index bf5aa8258..cd4b317fd 100644 --- a/apps/client/src/lib/editor/utils.ts +++ b/apps/client/src/lib/editor/utils.ts @@ -1,4 +1,4 @@ -import { SlateEditor, Text } from "@snailycad/utils/editor"; +import type { SlateEditor, Text } from "@snailycad/utils/editor"; import { Editor, Transforms, Element as SlateElement } from "slate"; const LIST_TYPES = ["numbered-list", "bulleted-list"]; diff --git a/apps/client/src/lib/editor/withChecklists.ts b/apps/client/src/lib/editor/withChecklists.ts index 174f41541..1e1754785 100644 --- a/apps/client/src/lib/editor/withChecklists.ts +++ b/apps/client/src/lib/editor/withChecklists.ts @@ -1,4 +1,4 @@ -import { SlateEditor } from "@snailycad/utils/editor"; +import type { SlateEditor } from "@snailycad/utils/editor"; import { Editor, Transforms, Range, Point, Element as SlateElement } from "slate"; export function withChecklists(editor: SlateEditor) { diff --git a/apps/client/src/lib/editor/withShortcuts.ts b/apps/client/src/lib/editor/withShortcuts.ts index ef553c3b9..3bfb9c92b 100644 --- a/apps/client/src/lib/editor/withShortcuts.ts +++ b/apps/client/src/lib/editor/withShortcuts.ts @@ -1,4 +1,4 @@ -import { SlateEditor } from "@snailycad/utils/editor"; +import type { SlateEditor } from "@snailycad/utils/editor"; import { Editor, Transforms, Range, Point, Element as SlateElement } from "slate"; type SHORTCUTS = (typeof SHORTCUTS)[keyof typeof SHORTCUTS]; diff --git a/apps/client/src/lib/map/create-map-units-from-active-units.ts.ts b/apps/client/src/lib/map/create-map-units-from-active-units.ts.ts index d35a7e97c..b5f7f1f31 100644 --- a/apps/client/src/lib/map/create-map-units-from-active-units.ts.ts +++ b/apps/client/src/lib/map/create-map-units-from-active-units.ts.ts @@ -1,12 +1,12 @@ import { - CombinedEmsFdUnit, - CombinedLeoUnit, - EmsFdDeputy, - Officer, + type CombinedEmsFdUnit, + type CombinedLeoUnit, + type EmsFdDeputy, + type Officer, ShouldDoType, } from "@snailycad/types"; import { isUnitCombined, isUnitCombinedEmsFd } from "@snailycad/utils"; -import { MapPlayer, PlayerDataEventPayload } from "types/map"; +import type { MapPlayer, PlayerDataEventPayload } from "types/map"; interface ActiveUnitsOptions { players: (MapPlayer | PlayerDataEventPayload)[]; diff --git a/apps/client/src/lib/useFetch.tsx b/apps/client/src/lib/useFetch.tsx index 1caee8e60..612245d1a 100644 --- a/apps/client/src/lib/useFetch.tsx +++ b/apps/client/src/lib/useFetch.tsx @@ -8,8 +8,8 @@ import { ModalIds } from "../types/modal-ids"; import { useAuth } from "../context/AuthContext"; import { getNextI18nConfig } from "./i18n/getNextI18nConfig"; import { - ErrorMessage, - ErrorResponseData, + type ErrorMessage, + type ErrorResponseData, getErrorObj, getFeatureNotEnabledError, isAxiosError, diff --git a/apps/client/src/lib/utils.ts b/apps/client/src/lib/utils.ts index 2e7cd705f..f133be140 100644 --- a/apps/client/src/lib/utils.ts +++ b/apps/client/src/lib/utils.ts @@ -5,9 +5,9 @@ import { type Value, type ValueLicenseType, WhitelistStatus, - EmsFdDeputy, - CombinedEmsFdUnit, - Business, + type EmsFdDeputy, + type CombinedEmsFdUnit, + type Business, } from "@snailycad/types"; import { isUnitCombined, isUnitCombinedEmsFd, isUnitOfficer } from "@snailycad/utils/typeguards"; import { handleRequest } from "./fetch"; diff --git a/apps/client/src/lib/validation/does-user-have-required-connections.ts b/apps/client/src/lib/validation/does-user-have-required-connections.ts index 150658676..50265fec0 100644 --- a/apps/client/src/lib/validation/does-user-have-required-connections.ts +++ b/apps/client/src/lib/validation/does-user-have-required-connections.ts @@ -1,4 +1,4 @@ -import { Feature, Rank, User } from "@snailycad/types"; +import { Feature, Rank, type User } from "@snailycad/types"; import { DEFAULT_DISABLED_FEATURES } from "hooks/useFeatureEnabled"; interface VerifyUserConnectionsOptions { diff --git a/apps/client/src/lib/validation/zod-error-map.ts b/apps/client/src/lib/validation/zod-error-map.ts index df2ce6a54..38df55997 100644 --- a/apps/client/src/lib/validation/zod-error-map.ts +++ b/apps/client/src/lib/validation/zod-error-map.ts @@ -1,5 +1,11 @@ import { createTranslator } from "use-intl"; -import { ErrorMapCtx, util, ZodIssueCode, ZodIssueOptionalMessage, ZodParsedType } from "zod"; +import { + type ErrorMapCtx, + util, + ZodIssueCode, + type ZodIssueOptionalMessage, + ZodParsedType, +} from "zod"; export interface GetErrorMapOptions { locale: string; diff --git a/apps/client/src/pages/_error.tsx b/apps/client/src/pages/_error.tsx index eeee89181..b97afedff 100644 --- a/apps/client/src/pages/_error.tsx +++ b/apps/client/src/pages/_error.tsx @@ -1,6 +1,6 @@ import { Button } from "@snailycad/ui"; import type { NextPageContext } from "next"; -import NextErrorComponent, { ErrorProps } from "next/error"; +import NextErrorComponent, { type ErrorProps } from "next/error"; import * as Sentry from "@sentry/nextjs"; interface ErrorPageProps extends ErrorProps { diff --git a/apps/client/src/pages/account.tsx b/apps/client/src/pages/account.tsx index 2101190c5..b31d75a47 100644 --- a/apps/client/src/pages/account.tsx +++ b/apps/client/src/pages/account.tsx @@ -13,7 +13,7 @@ import { useMounted } from "@casperiv/useful"; import { Title } from "components/shared/Title"; import { toastMessage } from "lib/toastMessage"; import { canUseThirdPartyConnections } from "lib/utils"; -import { getAvailableSounds, Sounds } from "lib/server/getAvailableSounds.server"; +import { getAvailableSounds, type Sounds } from "lib/server/getAvailableSounds.server"; import { AccountInfoTab } from "components/account/account-info-tab"; const AccountSettingsTab = dynamic( diff --git a/apps/client/src/pages/admin/import/vehicles.tsx b/apps/client/src/pages/admin/import/vehicles.tsx index b4ad7ffcc..59cf87822 100644 --- a/apps/client/src/pages/admin/import/vehicles.tsx +++ b/apps/client/src/pages/admin/import/vehicles.tsx @@ -6,7 +6,7 @@ import type { GetServerSideProps } from "next"; import { AdminLayout } from "components/admin/AdminLayout"; import { requestAll } from "lib/utils"; import { Title } from "components/shared/Title"; -import { RegisteredVehicle } from "@snailycad/types"; +import type { RegisteredVehicle } from "@snailycad/types"; import { Table, useTableState } from "components/shared/Table"; import { Button, FullDate } from "@snailycad/ui"; import { ImportModal } from "components/admin/import/ImportModal"; diff --git a/apps/client/src/pages/admin/import/weapons.tsx b/apps/client/src/pages/admin/import/weapons.tsx index 2df14f6a4..a1a1ea0df 100644 --- a/apps/client/src/pages/admin/import/weapons.tsx +++ b/apps/client/src/pages/admin/import/weapons.tsx @@ -6,7 +6,7 @@ import type { GetServerSideProps } from "next"; import { AdminLayout } from "components/admin/AdminLayout"; import { requestAll } from "lib/utils"; import { Title } from "components/shared/Title"; -import { Weapon } from "@snailycad/types"; +import type { Weapon } from "@snailycad/types"; import { Table, useTableState } from "components/shared/Table"; import { Button, FullDate } from "@snailycad/ui"; import { ImportModal } from "components/admin/import/ImportModal"; diff --git a/apps/client/src/pages/admin/values/penal-code/index.tsx b/apps/client/src/pages/admin/values/penal-code/index.tsx index c4de3326b..7825ae9cf 100644 --- a/apps/client/src/pages/admin/values/penal-code/index.tsx +++ b/apps/client/src/pages/admin/values/penal-code/index.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { PenalCodeGroup, ValueType } from "@snailycad/types"; +import { type PenalCodeGroup, ValueType } from "@snailycad/types"; import { Table, useAsyncTable, useTableState } from "components/shared/Table"; import { getSessionUser } from "lib/auth"; import { getTranslations } from "lib/getTranslation"; diff --git a/apps/client/src/pages/auth/account-password.tsx b/apps/client/src/pages/auth/account-password.tsx index d96d8cc14..cc43571db 100644 --- a/apps/client/src/pages/auth/account-password.tsx +++ b/apps/client/src/pages/auth/account-password.tsx @@ -1,4 +1,4 @@ -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { useRouter } from "next/router"; import { TEMP_PASSWORD_SCHEMA } from "@snailycad/schemas"; import { useTranslations } from "use-intl"; diff --git a/apps/client/src/pages/auth/register.tsx b/apps/client/src/pages/auth/register.tsx index fb4b8c0a6..8995c77b7 100644 --- a/apps/client/src/pages/auth/register.tsx +++ b/apps/client/src/pages/auth/register.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import Link from "next/link"; import { useRouter } from "next/router"; import { AUTH_SCHEMA } from "@snailycad/schemas"; @@ -10,7 +10,7 @@ import { handleValidate } from "lib/handleValidate"; import type { GetServerSideProps } from "next"; import { getTranslations } from "lib/getTranslation"; import { Button, Loader, TextField } from "@snailycad/ui"; -import { cad, WhitelistStatus } from "@snailycad/types"; +import { type cad, WhitelistStatus } from "@snailycad/types"; import { handleRequest } from "lib/fetch"; import { Title } from "components/shared/Title"; import { AuthScreenImages } from "components/auth/auth-screen-images"; diff --git a/apps/client/src/pages/auth/temp-password.tsx b/apps/client/src/pages/auth/temp-password.tsx index 78886f3df..3d4933c25 100644 --- a/apps/client/src/pages/auth/temp-password.tsx +++ b/apps/client/src/pages/auth/temp-password.tsx @@ -1,4 +1,4 @@ -import { Form, Formik, FormikHelpers } from "formik"; +import { Form, Formik, type FormikHelpers } from "formik"; import { useRouter } from "next/router"; import { TEMP_PASSWORD_SCHEMA } from "@snailycad/schemas"; import { useTranslations } from "use-intl"; diff --git a/apps/client/src/pages/bleeter/@/[handle].tsx b/apps/client/src/pages/bleeter/@/[handle].tsx index 71d382aa5..2d16ce7b5 100644 --- a/apps/client/src/pages/bleeter/@/[handle].tsx +++ b/apps/client/src/pages/bleeter/@/[handle].tsx @@ -1,5 +1,5 @@ import { defaultPermissions } from "@snailycad/permissions"; -import { GetBleeterProfileByHandleData } from "@snailycad/types/api"; +import type { GetBleeterProfileByHandleData } from "@snailycad/types/api"; import { Button, Loader } from "@snailycad/ui"; import { Layout } from "components/Layout"; import { BleeterPostsList } from "components/bleeter/list/posts-list"; @@ -19,7 +19,7 @@ import { classNames } from "lib/classNames"; import { getTranslations } from "lib/getTranslation"; import useFetch from "lib/useFetch"; import { requestAll } from "lib/utils"; -import { GetServerSideProps } from "next"; +import type { GetServerSideProps } from "next"; import { useRouter } from "next/router"; import { PatchCheckFill } from "react-bootstrap-icons"; import { useModal } from "state/modalState"; diff --git a/apps/client/src/pages/business/[id]/[employeeId]/index.tsx b/apps/client/src/pages/business/[id]/[employeeId]/index.tsx index a79f5bce5..349a5fa0d 100644 --- a/apps/client/src/pages/business/[id]/[employeeId]/index.tsx +++ b/apps/client/src/pages/business/[id]/[employeeId]/index.tsx @@ -11,7 +11,7 @@ import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { useBusinessState } from "state/business-state"; import { useTranslations } from "use-intl"; -import { BusinessPost, WhitelistStatus } from "@snailycad/types"; +import { type BusinessPost, WhitelistStatus } from "@snailycad/types"; import useFetch from "lib/useFetch"; import dynamic from "next/dynamic"; import { requestAll } from "lib/utils"; diff --git a/apps/client/src/pages/business/[id]/[employeeId]/manage.tsx b/apps/client/src/pages/business/[id]/[employeeId]/manage.tsx index b09b71bf5..f1e895b36 100644 --- a/apps/client/src/pages/business/[id]/[employeeId]/manage.tsx +++ b/apps/client/src/pages/business/[id]/[employeeId]/manage.tsx @@ -5,7 +5,7 @@ import { Layout } from "components/Layout"; import { getSessionUser } from "lib/auth"; import { getTranslations } from "lib/getTranslation"; -import { FullBusiness, FullEmployee, useBusinessState } from "state/business-state"; +import { type FullBusiness, type FullEmployee, useBusinessState } from "state/business-state"; import { useTranslations } from "use-intl"; import { EmployeeAsEnum } from "@snailycad/types"; import dynamic from "next/dynamic"; @@ -13,7 +13,7 @@ import { requestAll } from "lib/utils"; import { Title } from "components/shared/Title"; import { EmployeesTab } from "components/business/manage/tabs/employees-tab/employees-tab"; import { TabList, BreadcrumbItem, Breadcrumbs } from "@snailycad/ui"; -import { GetBusinessByIdData } from "@snailycad/types/api"; +import type { GetBusinessByIdData } from "@snailycad/types/api"; interface Props { employee: FullEmployee | null; diff --git a/apps/client/src/pages/ems-fd/hospital-services.tsx b/apps/client/src/pages/ems-fd/hospital-services.tsx index 33c5faf5e..930d2f8e4 100644 --- a/apps/client/src/pages/ems-fd/hospital-services.tsx +++ b/apps/client/src/pages/ems-fd/hospital-services.tsx @@ -11,7 +11,7 @@ import { Title } from "components/shared/Title"; import { usePermission, Permissions } from "hooks/usePermission"; import type { GetDeadCitizensData, PostEmsFdDeclareCitizenById } from "@snailycad/types/api"; import { Table, useAsyncTable, useTableState } from "components/shared/Table"; -import { Citizen } from "@snailycad/types"; +import type { Citizen } from "@snailycad/types"; import { AlertModal } from "components/modal/AlertModal"; import useFetch from "lib/useFetch"; import { useTemporaryItem } from "hooks/shared/useTemporaryItem"; diff --git a/apps/client/src/pages/officer/index.tsx b/apps/client/src/pages/officer/index.tsx index 0850f4b7f..89e56c56f 100644 --- a/apps/client/src/pages/officer/index.tsx +++ b/apps/client/src/pages/officer/index.tsx @@ -10,7 +10,7 @@ import { useLeoState } from "state/leo-state"; import { ActiveToneType, DashboardLayoutCardType, - Record, + type Record, RecordType, ValueType, } from "@snailycad/types"; diff --git a/apps/client/src/pages/officer/jail.tsx b/apps/client/src/pages/officer/jail.tsx index f9b57dac4..eba879d83 100644 --- a/apps/client/src/pages/officer/jail.tsx +++ b/apps/client/src/pages/officer/jail.tsx @@ -6,7 +6,13 @@ import { getSessionUser } from "lib/auth"; import { getTranslations } from "lib/getTranslation"; import { makeUnitName, requestAll } from "lib/utils"; import type { GetServerSideProps } from "next"; -import { Record, BaseCitizen, RecordRelease, ReleaseType, ValueType } from "@snailycad/types"; +import { + type Record, + type BaseCitizen, + type RecordRelease, + ReleaseType, + ValueType, +} from "@snailycad/types"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; import { Table, useTableState } from "components/shared/Table"; diff --git a/apps/client/src/pages/officer/my-officers.tsx b/apps/client/src/pages/officer/my-officers.tsx index 9c640d3db..fca98b3f1 100644 --- a/apps/client/src/pages/officer/my-officers.tsx +++ b/apps/client/src/pages/officer/my-officers.tsx @@ -8,7 +8,7 @@ import { getSessionUser } from "lib/auth"; import { getTranslations } from "lib/getTranslation"; import type { GetServerSideProps } from "next"; import { ModalIds } from "types/modal-ids"; -import { Officer, ValueType } from "@snailycad/types"; +import { type Officer, ValueType } from "@snailycad/types"; import useFetch from "lib/useFetch"; import { formatOfficerDepartment, formatUnitDivisions, makeUnitName, requestAll } from "lib/utils"; import { useGenerateCallsign } from "hooks/useGenerateCallsign"; diff --git a/apps/client/src/pages/officer/supervisor/citizen-logs/[citizenId].tsx b/apps/client/src/pages/officer/supervisor/citizen-logs/[citizenId].tsx index 0138d386e..168f13a3a 100644 --- a/apps/client/src/pages/officer/supervisor/citizen-logs/[citizenId].tsx +++ b/apps/client/src/pages/officer/supervisor/citizen-logs/[citizenId].tsx @@ -4,7 +4,7 @@ import { getSessionUser } from "lib/auth"; import { getTranslations } from "lib/getTranslation"; import { makeUnitName, requestAll } from "lib/utils"; import type { GetServerSideProps } from "next"; -import { Citizen, RecordLog, RecordType } from "@snailycad/types"; +import { type Citizen, type RecordLog, RecordType } from "@snailycad/types"; import { Title } from "components/shared/Title"; import { Permissions } from "@snailycad/permissions"; import type { GetManageRecordsLogsCitizenData } from "@snailycad/types/api"; diff --git a/apps/client/src/pages/officer/supervisor/exams.tsx b/apps/client/src/pages/officer/supervisor/exams.tsx index 8fe12d174..59a949d41 100644 --- a/apps/client/src/pages/officer/supervisor/exams.tsx +++ b/apps/client/src/pages/officer/supervisor/exams.tsx @@ -6,7 +6,7 @@ import { getSessionUser } from "lib/auth"; import { getTranslations } from "lib/getTranslation"; import { requestAll } from "lib/utils"; import type { GetServerSideProps } from "next"; -import { LicenseExam, LicenseExamStatus } from "@snailycad/types"; +import { type LicenseExam, LicenseExamStatus } from "@snailycad/types"; import { Table, useTableState } from "components/shared/Table"; import { Title } from "components/shared/Title"; import { Permissions } from "@snailycad/permissions"; diff --git a/apps/client/src/pages/pets/[id]/index.tsx b/apps/client/src/pages/pets/[id]/index.tsx index 88468deb5..1f7720589 100644 --- a/apps/client/src/pages/pets/[id]/index.tsx +++ b/apps/client/src/pages/pets/[id]/index.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { GetPetByIdData } from "@snailycad/types/api"; +import type { GetPetByIdData } from "@snailycad/types/api"; import { BreadcrumbItem, Breadcrumbs, Loader } from "@snailycad/ui"; import { Layout } from "components/Layout"; import { PetInformationCard } from "components/citizen/pets/pet-information-card"; @@ -7,7 +7,7 @@ import { Title } from "components/shared/Title"; import { getSessionUser } from "lib/auth"; import { getTranslations } from "lib/getTranslation"; import { requestAll } from "lib/utils"; -import { GetServerSideProps } from "next"; +import type { GetServerSideProps } from "next"; import { usePetsState } from "state/citizen/pets-state"; import { useTranslations } from "use-intl"; import { PetMedicalRecordsCard } from "components/citizen/pets/medical-records/pet-medical-records-card"; diff --git a/apps/client/src/pages/pets/index.tsx b/apps/client/src/pages/pets/index.tsx index 87370bbad..2fb3f4c5d 100644 --- a/apps/client/src/pages/pets/index.tsx +++ b/apps/client/src/pages/pets/index.tsx @@ -1,4 +1,4 @@ -import { GetUserPetsData } from "@snailycad/types/api"; +import type { GetUserPetsData } from "@snailycad/types/api"; import { Button, buttonVariants } from "@snailycad/ui"; import { Layout } from "components/Layout"; import { ManagePetModal } from "components/citizen/pets/manage-pet-modal"; @@ -7,7 +7,7 @@ import { Title } from "components/shared/Title"; import { getSessionUser } from "lib/auth"; import { getTranslations } from "lib/getTranslation"; import { requestAll } from "lib/utils"; -import { GetServerSideProps } from "next"; +import type { GetServerSideProps } from "next"; import Link from "next/link"; import { useModal } from "state/modalState"; import { ModalIds } from "types/modal-ids"; diff --git a/apps/client/src/pages/taxi.tsx b/apps/client/src/pages/taxi.tsx index 65bdf3d60..49704244a 100644 --- a/apps/client/src/pages/taxi.tsx +++ b/apps/client/src/pages/taxi.tsx @@ -11,7 +11,7 @@ import { requestAll } from "lib/utils"; import { Title } from "components/shared/Title"; import { TowTaxiCallsTable } from "components/citizen/tow/tow-taxi-calls-table"; import { Permissions } from "@snailycad/permissions"; -import { GetTaxiCallsData } from "@snailycad/types/api"; +import type { GetTaxiCallsData } from "@snailycad/types/api"; interface Props { initialData: GetTaxiCallsData; diff --git a/apps/client/src/state/mapState.ts b/apps/client/src/state/mapState.ts index 82e488dc4..1896e9925 100644 --- a/apps/client/src/state/mapState.ts +++ b/apps/client/src/state/mapState.ts @@ -1,6 +1,6 @@ import { ConnectionStatus } from "@snailycad/ui"; import { Socket } from "socket.io-client"; -import { SmartMotorwaySignMarker, SmartSignMarker } from "types/map"; +import type { SmartMotorwaySignMarker, SmartSignMarker } from "types/map"; import { persist, createJSONStorage } from "zustand/middleware"; import { shallow } from "zustand/shallow"; import { createWithEqualityFn } from "zustand/traditional"; diff --git a/apps/client/tsconfig.json b/apps/client/tsconfig.json index 9a684683b..58d68d448 100644 --- a/apps/client/tsconfig.json +++ b/apps/client/tsconfig.json @@ -5,16 +5,12 @@ "module": "ESNext", "incremental": true, "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, "noEmit": true, - "esModuleInterop": true, "moduleResolution": "node", - "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", - "strict": true, + "verbatimModuleSyntax": true, + "baseUrl": ".", "paths": { "lib/*": ["./src/lib/*"], @@ -31,6 +27,13 @@ } ] }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + "**/*.json", + "./i18n.config.mjs", + ".next/types/**/*.ts" + ], "exclude": ["node_modules"] } diff --git a/tsconfig.base.json b/tsconfig.base.json index 26095cdb9..34adf31cf 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -20,6 +20,7 @@ "noImplicitThis": true, "alwaysStrict": true, "pretty": true, + "forceConsistentCasingInFileNames": true, /* Additional Checks */ "noUnusedLocals": true /* Report errors on unused locals. */, @@ -28,6 +29,10 @@ "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, "noUncheckedIndexedAccess": true /* Include 'undefined' in index signature results */, "allowUnreachableCode": false, - "lib": ["es2022"] + "lib": ["es2022"], + + /* Monorepo options */ + "composite": true, + "declarationMap": true } }