diff options
author | Samuel Newman <mozzius@protonmail.com> | 2025-09-09 18:38:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-09 08:38:21 -0700 |
commit | 53e43a957c2e0f3f020c34653cbf5029ec6dd8bb (patch) | |
tree | 71f93d1c41d64109e600bbe91056b4b4e07c83e1 /src/components | |
parent | bb30b592d787870adc4b4d3e5029d8dc3125f7e7 (diff) | |
download | voidsky-53e43a957c2e0f3f020c34653cbf5029ec6dd8bb.tar.zst |
run `yarn lint --fix` (#9013)
Diffstat (limited to 'src/components')
51 files changed, 130 insertions, 119 deletions
diff --git a/src/components/Dialog/utils.ts b/src/components/Dialog/utils.ts index 058d6e804..812e8cca1 100644 --- a/src/components/Dialog/utils.ts +++ b/src/components/Dialog/utils.ts @@ -1,6 +1,6 @@ import React from 'react' -import {DialogControlProps} from '#/components/Dialog/types' +import {type DialogControlProps} from '#/components/Dialog/types' export function useAutoOpen(control: DialogControlProps, showTimeout?: number) { React.useEffect(() => { diff --git a/src/components/Fill.tsx b/src/components/Fill.tsx index ac74f1660..8ad352473 100644 --- a/src/components/Fill.tsx +++ b/src/components/Fill.tsx @@ -1,7 +1,7 @@ -import React from 'react' import {View} from 'react-native' +import type React from 'react' -import {atoms as a, ViewStyleProp} from '#/alf' +import {atoms as a, type ViewStyleProp} from '#/alf' export function Fill({ children, diff --git a/src/components/GradientFill.tsx b/src/components/GradientFill.tsx index 9ad6ed7dc..863988171 100644 --- a/src/components/GradientFill.tsx +++ b/src/components/GradientFill.tsx @@ -1,6 +1,6 @@ import {LinearGradient} from 'expo-linear-gradient' -import {atoms as a, tokens, ViewStyleProp} from '#/alf' +import {atoms as a, type tokens, type ViewStyleProp} from '#/alf' export function GradientFill({ gradient, diff --git a/src/components/IconCircle.tsx b/src/components/IconCircle.tsx index 2119c9f8d..286dc2837 100644 --- a/src/components/IconCircle.tsx +++ b/src/components/IconCircle.tsx @@ -3,12 +3,12 @@ import {View} from 'react-native' import { atoms as a, flatten, - TextStyleProp, + type TextStyleProp, useTheme, - ViewStyleProp, + type ViewStyleProp, } from '#/alf' -import {Props} from '#/components/icons/common' -import {Growth_Stroke2_Corner0_Rounded as Growth} from '#/components/icons/Growth' +import {type Props} from '#/components/icons/common' +import {type Growth_Stroke2_Corner0_Rounded as Growth} from '#/components/icons/Growth' export function IconCircle({ icon: Icon, diff --git a/src/components/LabelingServiceCard/index.tsx b/src/components/LabelingServiceCard/index.tsx index b144c1dc8..990dbb1c6 100644 --- a/src/components/LabelingServiceCard/index.tsx +++ b/src/components/LabelingServiceCard/index.tsx @@ -1,16 +1,16 @@ -import React from 'react' import {View} from 'react-native' -import {AppBskyLabelerDefs} from '@atproto/api' +import {type AppBskyLabelerDefs} from '@atproto/api' import {msg, Plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' +import type React from 'react' import {getLabelingServiceTitle} from '#/lib/moderation' import {sanitizeHandle} from '#/lib/strings/handles' import {useLabelerInfoQuery} from '#/state/queries/labeler' import {UserAvatar} from '#/view/com/util/UserAvatar' -import {atoms as a, useTheme, ViewStyleProp} from '#/alf' +import {atoms as a, useTheme, type ViewStyleProp} from '#/alf' import {Flag_Stroke2_Corner0_Rounded as Flag} from '#/components/icons/Flag' -import {Link as InternalLink, LinkProps} from '#/components/Link' +import {Link as InternalLink, type LinkProps} from '#/components/Link' import {RichText} from '#/components/RichText' import {Text} from '#/components/Typography' import {ChevronRight_Stroke2_Corner0_Rounded as ChevronRight} from '../icons/Chevron' diff --git a/src/components/LikedByList.tsx b/src/components/LikedByList.tsx index b369bd76e..bd4a9f551 100644 --- a/src/components/LikedByList.tsx +++ b/src/components/LikedByList.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {AppBskyFeedGetLikes as GetLikes} from '@atproto/api' +import {type AppBskyFeedGetLikes as GetLikes} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/LinearGradientBackground.tsx b/src/components/LinearGradientBackground.tsx index 9b28b897c..b208f3ff3 100644 --- a/src/components/LinearGradientBackground.tsx +++ b/src/components/LinearGradientBackground.tsx @@ -1,6 +1,6 @@ -import React from 'react' -import {StyleProp, ViewStyle} from 'react-native' +import {type StyleProp, type ViewStyle} from 'react-native' import {LinearGradient} from 'expo-linear-gradient' +import type React from 'react' import {gradients} from '#/alf/tokens' diff --git a/src/components/Loader.tsx b/src/components/Loader.tsx index 149554912..21970c278 100644 --- a/src/components/Loader.tsx +++ b/src/components/Loader.tsx @@ -8,7 +8,7 @@ import Animated, { } from 'react-native-reanimated' import {atoms as a, flatten, useTheme} from '#/alf' -import {Props, useCommonSVGProps} from '#/components/icons/common' +import {type Props, useCommonSVGProps} from '#/components/icons/common' import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader' export function Loader(props: Props) { diff --git a/src/components/Loader.web.tsx b/src/components/Loader.web.tsx index acf0acfc4..5eefeb109 100644 --- a/src/components/Loader.web.tsx +++ b/src/components/Loader.web.tsx @@ -1,7 +1,7 @@ import {View} from 'react-native' import {atoms as a, flatten, useTheme} from '#/alf' -import {Props, useCommonSVGProps} from '#/components/icons/common' +import {type Props, useCommonSVGProps} from '#/components/icons/common' import {Loader_Stroke2_Corner0_Rounded as Icon} from '#/components/icons/Loader' export function Loader(props: Props) { diff --git a/src/components/MediaInsetBorder.tsx b/src/components/MediaInsetBorder.tsx index ed89880f4..a341a77d3 100644 --- a/src/components/MediaInsetBorder.tsx +++ b/src/components/MediaInsetBorder.tsx @@ -1,6 +1,6 @@ -import React from 'react' +import type React from 'react' -import {atoms as a, useTheme, ViewStyleProp} from '#/alf' +import {atoms as a, useTheme, type ViewStyleProp} from '#/alf' import {Fill} from '#/components/Fill' /** diff --git a/src/components/Menu/types.ts b/src/components/Menu/types.ts index 51baa24df..e9ee082f4 100644 --- a/src/components/Menu/types.ts +++ b/src/components/Menu/types.ts @@ -1,14 +1,14 @@ -import React from 'react' import { - AccessibilityProps, - AccessibilityRole, - GestureResponderEvent, - PressableProps, + type AccessibilityProps, + type AccessibilityRole, + type GestureResponderEvent, + type PressableProps, } from 'react-native' +import type React from 'react' -import {TextStyleProp, ViewStyleProp} from '#/alf' -import * as Dialog from '#/components/Dialog' -import {Props as SVGIconProps} from '#/components/icons/common' +import {type TextStyleProp, type ViewStyleProp} from '#/alf' +import type * as Dialog from '#/components/Dialog' +import {type Props as SVGIconProps} from '#/components/icons/common' export type ContextType = { control: Dialog.DialogOuterProps['control'] diff --git a/src/components/NewskieDialog.tsx b/src/components/NewskieDialog.tsx index accf07a98..0644ba704 100644 --- a/src/components/NewskieDialog.tsx +++ b/src/components/NewskieDialog.tsx @@ -1,6 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {AppBskyActorDefs, moderateProfile} from '@atproto/api' +import {type AppBskyActorDefs, moderateProfile} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {differenceInSeconds} from 'date-fns' diff --git a/src/components/Pills.tsx b/src/components/Pills.tsx index 3eddf1b9a..550089a80 100644 --- a/src/components/Pills.tsx +++ b/src/components/Pills.tsx @@ -1,11 +1,11 @@ import React from 'react' import {View} from 'react-native' -import {BSKY_LABELER_DID, ModerationCause} from '@atproto/api' +import {BSKY_LABELER_DID, type ModerationCause} from '@atproto/api' import {Trans} from '@lingui/macro' import {useModerationCauseDescription} from '#/lib/moderation/useModerationCauseDescription' import {UserAvatar} from '#/view/com/util/UserAvatar' -import {atoms as a, useTheme, ViewStyleProp} from '#/alf' +import {atoms as a, useTheme, type ViewStyleProp} from '#/alf' import {Button} from '#/components/Button' import { ModerationDetailsDialog, diff --git a/src/components/ProgressGuide/List.tsx b/src/components/ProgressGuide/List.tsx index bbc5a0177..52fc4c27a 100644 --- a/src/components/ProgressGuide/List.tsx +++ b/src/components/ProgressGuide/List.tsx @@ -1,4 +1,4 @@ -import {StyleProp, View, ViewStyle} from 'react-native' +import {type StyleProp, View, type ViewStyle} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/ReportDialog/SelectLabelerView.tsx b/src/components/ReportDialog/SelectLabelerView.tsx index df472241e..be666ced1 100644 --- a/src/components/ReportDialog/SelectLabelerView.tsx +++ b/src/components/ReportDialog/SelectLabelerView.tsx @@ -1,5 +1,5 @@ import {View} from 'react-native' -import {AppBskyLabelerDefs} from '@atproto/api' +import {type AppBskyLabelerDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -9,7 +9,7 @@ import {Button, useButtonContext} from '#/components/Button' import {Divider} from '#/components/Divider' import * as LabelingServiceCard from '#/components/LabelingServiceCard' import {Text} from '#/components/Typography' -import {ReportDialogProps} from './types' +import {type ReportDialogProps} from './types' export function SelectLabelerView({ ...props diff --git a/src/components/ReportDialog/SelectReportOptionView.tsx b/src/components/ReportDialog/SelectReportOptionView.tsx index 92a442cbd..f5165f8f7 100644 --- a/src/components/ReportDialog/SelectReportOptionView.tsx +++ b/src/components/ReportDialog/SelectReportOptionView.tsx @@ -1,10 +1,13 @@ import React from 'react' import {View} from 'react-native' -import {AppBskyLabelerDefs} from '@atproto/api' +import {type AppBskyLabelerDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {ReportOption, useReportOptions} from '#/lib/moderation/useReportOptions' +import { + type ReportOption, + useReportOptions, +} from '#/lib/moderation/useReportOptions' import {Link} from '#/components/Link' import {DMCA_LINK} from '#/components/ReportDialog/const' export {useDialogControl as useReportDialogControl} from '#/components/Dialog' @@ -23,7 +26,7 @@ import { } from '#/components/icons/Chevron' import {SquareArrowTopRight_Stroke2_Corner0_Rounded as SquareArrowTopRight} from '#/components/icons/SquareArrowTopRight' import {Text} from '#/components/Typography' -import {ReportDialogProps} from './types' +import {type ReportDialogProps} from './types' export function SelectReportOptionView(props: { params: ReportDialogProps['params'] diff --git a/src/components/ReportDialog/SubmitView.tsx b/src/components/ReportDialog/SubmitView.tsx index 36bd1d466..418f364a7 100644 --- a/src/components/ReportDialog/SubmitView.tsx +++ b/src/components/ReportDialog/SubmitView.tsx @@ -1,11 +1,11 @@ import React from 'react' import {View} from 'react-native' -import {AppBskyLabelerDefs} from '@atproto/api' +import {type AppBskyLabelerDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {getLabelingServiceTitle} from '#/lib/moderation' -import {ReportOption} from '#/lib/moderation/useReportOptions' +import {type ReportOption} from '#/lib/moderation/useReportOptions' import {isAndroid} from '#/platform/detection' import {useAgent} from '#/state/session' import {CharProgress} from '#/view/com/composer/char-progress/CharProgress' @@ -19,7 +19,7 @@ import {ChevronLeft_Stroke2_Corner0_Rounded as ChevronLeft} from '#/components/i import {PaperPlane_Stroke2_Corner0_Rounded as SendIcon} from '#/components/icons/PaperPlane' import {Loader} from '#/components/Loader' import {Text} from '#/components/Typography' -import {ReportDialogProps} from './types' +import {type ReportDialogProps} from './types' export function SubmitView({ params, diff --git a/src/components/ReportDialog/index.tsx b/src/components/ReportDialog/index.tsx index 4402152ab..2401ab89f 100644 --- a/src/components/ReportDialog/index.tsx +++ b/src/components/ReportDialog/index.tsx @@ -1,14 +1,14 @@ import React from 'react' import {Pressable, View} from 'react-native' -import {ScrollView} from 'react-native-gesture-handler' +import {type ScrollView} from 'react-native-gesture-handler' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {ReportOption} from '#/lib/moderation/useReportOptions' +import {type ReportOption} from '#/lib/moderation/useReportOptions' import {useMyLabelersQuery} from '#/state/queries/preferences' export {useDialogControl as useReportDialogControl} from '#/components/Dialog' -import {AppBskyLabelerDefs} from '@atproto/api' +import {type AppBskyLabelerDefs} from '@atproto/api' import {atoms as a} from '#/alf' import * as Dialog from '#/components/Dialog' @@ -18,7 +18,7 @@ import {Text} from '#/components/Typography' import {SelectLabelerView} from './SelectLabelerView' import {SelectReportOptionView} from './SelectReportOptionView' import {SubmitView} from './SubmitView' -import {ReportDialogProps} from './types' +import {type ReportDialogProps} from './types' export function ReportDialog(props: ReportDialogProps) { return ( diff --git a/src/components/ReportDialog/types.ts b/src/components/ReportDialog/types.ts index 3f43db4a1..ac9a18d6d 100644 --- a/src/components/ReportDialog/types.ts +++ b/src/components/ReportDialog/types.ts @@ -1,4 +1,4 @@ -import * as Dialog from '#/components/Dialog' +import type * as Dialog from '#/components/Dialog' export type ReportDialogProps = { control: Dialog.DialogOuterProps['control'] diff --git a/src/components/RichTextTag.tsx b/src/components/RichTextTag.tsx index 562d44aa6..93d2399be 100644 --- a/src/components/RichTextTag.tsx +++ b/src/components/RichTextTag.tsx @@ -1,10 +1,10 @@ import React from 'react' -import {StyleProp, Text as RNText, TextStyle} from 'react-native' +import {type StyleProp, Text as RNText, type TextStyle} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useNavigation} from '@react-navigation/native' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {isInvalidHandle} from '#/lib/strings/handles' import {isNative, isWeb} from '#/platform/detection' import { diff --git a/src/components/StarterPack/Main/PostsList.tsx b/src/components/StarterPack/Main/PostsList.tsx index f706e0bff..0a17e038e 100644 --- a/src/components/StarterPack/Main/PostsList.tsx +++ b/src/components/StarterPack/Main/PostsList.tsx @@ -4,11 +4,11 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {isNative} from '#/platform/detection' -import {FeedDescriptor} from '#/state/queries/post-feed' +import {type FeedDescriptor} from '#/state/queries/post-feed' import {PostFeed} from '#/view/com/posts/PostFeed' import {EmptyState} from '#/view/com/util/EmptyState' -import {ListRef} from '#/view/com/util/List' -import {SectionRef} from '#/screens/Profile/Sections/types' +import {type ListRef} from '#/view/com/util/List' +import {type SectionRef} from '#/screens/Profile/Sections/types' interface ProfilesListProps { listUri: string diff --git a/src/components/StarterPack/Main/ProfilesList.tsx b/src/components/StarterPack/Main/ProfilesList.tsx index c1c10c76b..a1ddee5af 100644 --- a/src/components/StarterPack/Main/ProfilesList.tsx +++ b/src/components/StarterPack/Main/ProfilesList.tsx @@ -1,12 +1,15 @@ import React, {useCallback} from 'react' -import {ListRenderItemInfo, View} from 'react-native' +import {type ListRenderItemInfo, View} from 'react-native' import { - AppBskyActorDefs, - AppBskyGraphGetList, + type AppBskyActorDefs, + type AppBskyGraphGetList, AtUri, - ModerationOpts, + type ModerationOpts, } from '@atproto/api' -import {InfiniteData, UseInfiniteQueryResult} from '@tanstack/react-query' +import { + type InfiniteData, + type UseInfiniteQueryResult, +} from '@tanstack/react-query' import {useBottomBarOffset} from '#/lib/hooks/useBottomBarOffset' import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender' @@ -14,8 +17,8 @@ import {isBlockedOrBlocking} from '#/lib/moderation/blocked-and-muted' import {isNative, isWeb} from '#/platform/detection' import {useAllListMembersQuery} from '#/state/queries/list-members' import {useSession} from '#/state/session' -import {List, ListRef} from '#/view/com/util/List' -import {SectionRef} from '#/screens/Profile/Sections/types' +import {List, type ListRef} from '#/view/com/util/List' +import {type SectionRef} from '#/screens/Profile/Sections/types' import {atoms as a, useTheme} from '#/alf' import {ListFooter, ListMaybePlaceholder} from '#/components/Lists' import {Default as ProfileCard} from '#/components/ProfileCard' diff --git a/src/components/StarterPack/QrCode.tsx b/src/components/StarterPack/QrCode.tsx index 6443ec694..86f1aa1e6 100644 --- a/src/components/StarterPack/QrCode.tsx +++ b/src/components/StarterPack/QrCode.tsx @@ -3,7 +3,7 @@ import {View} from 'react-native' // @ts-expect-error missing types import QRCode from 'react-native-qrcode-styled' import type ViewShot from 'react-native-view-shot' -import {AppBskyGraphDefs, AppBskyGraphStarterpack} from '@atproto/api' +import {type AppBskyGraphDefs, AppBskyGraphStarterpack} from '@atproto/api' import {Trans} from '@lingui/macro' import {isWeb} from '#/platform/detection' diff --git a/src/components/StarterPack/Wizard/ScreenTransition.tsx b/src/components/StarterPack/Wizard/ScreenTransition.tsx index 9b76d4c60..c02888e1d 100644 --- a/src/components/StarterPack/Wizard/ScreenTransition.tsx +++ b/src/components/StarterPack/Wizard/ScreenTransition.tsx @@ -1,11 +1,11 @@ -import React from 'react' -import {StyleProp, ViewStyle} from 'react-native' +import {type StyleProp, type ViewStyle} from 'react-native' import Animated, { FadeIn, FadeOut, SlideInLeft, SlideInRight, } from 'react-native-reanimated' +import type React from 'react' import {isWeb} from '#/platform/detection' diff --git a/src/components/SubtleWebHover.tsx b/src/components/SubtleWebHover.tsx index 5cbbfc898..d60968e9c 100644 --- a/src/components/SubtleWebHover.tsx +++ b/src/components/SubtleWebHover.tsx @@ -1,4 +1,4 @@ -import {ViewStyleProp} from '#/alf' +import {type ViewStyleProp} from '#/alf' export function SubtleWebHover({}: ViewStyleProp & {hover: boolean}) { return null diff --git a/src/components/TrendingTopics.tsx b/src/components/TrendingTopics.tsx index a1de5d490..50e0fc5ed 100644 --- a/src/components/TrendingTopics.tsx +++ b/src/components/TrendingTopics.tsx @@ -1,6 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {AtUri} from '@atproto/api' +import {type AtUri} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -10,10 +10,10 @@ import {PressableScale} from '#/lib/custom-animations/PressableScale' // import {Hashtag_Stroke2_Corner0_Rounded as Hashtag} from '#/components/icons/Hashtag' // import {CloseQuote_Filled_Stroke2_Corner0_Rounded as Quote} from '#/components/icons/Quote' // import {UserAvatar} from '#/view/com/util/UserAvatar' -import type {TrendingTopic} from '#/state/queries/trending/useTrendingTopics' -import {atoms as a, native, useTheme, ViewStyleProp} from '#/alf' +import {type TrendingTopic} from '#/state/queries/trending/useTrendingTopics' +import {atoms as a, native, useTheme, type ViewStyleProp} from '#/alf' import {StarterPack as StarterPackIcon} from '#/components/icons/StarterPack' -import {Link as InternalLink, LinkProps} from '#/components/Link' +import {Link as InternalLink, type LinkProps} from '#/components/Link' import {Text} from '#/components/Typography' export function TrendingTopic({ diff --git a/src/components/VideoPostCard.tsx b/src/components/VideoPostCard.tsx index a1bdd29b4..010ab075d 100644 --- a/src/components/VideoPostCard.tsx +++ b/src/components/VideoPostCard.tsx @@ -3,11 +3,11 @@ import {View} from 'react-native' import {Image} from 'expo-image' import {LinearGradient} from 'expo-linear-gradient' import { - AppBskyActorDefs, + type AppBskyActorDefs, AppBskyEmbedVideo, - AppBskyFeedDefs, + type AppBskyFeedDefs, AppBskyFeedPost, - ModerationDecision, + type ModerationDecision, } from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -15,7 +15,7 @@ import {useLingui} from '@lingui/react' import {sanitizeHandle} from '#/lib/strings/handles' import {formatCount} from '#/view/com/util/numeric/format' import {UserAvatar} from '#/view/com/util/UserAvatar' -import {VideoFeedSourceContext} from '#/screens/VideoFeed/types' +import {type VideoFeedSourceContext} from '#/screens/VideoFeed/types' import {atoms as a, useTheme} from '#/alf' import {BLUE_HUE} from '#/alf/util/colorGeneration' import {select} from '#/alf/util/themeSelector' diff --git a/src/components/anim/AnimatedCheck.tsx b/src/components/anim/AnimatedCheck.tsx index 60407274e..2198598ca 100644 --- a/src/components/anim/AnimatedCheck.tsx +++ b/src/components/anim/AnimatedCheck.tsx @@ -8,7 +8,7 @@ import Animated, { } from 'react-native-reanimated' import Svg, {Circle, Path} from 'react-native-svg' -import {Props, useCommonSVGProps} from '#/components/icons/common' +import {type Props, useCommonSVGProps} from '#/components/icons/common' const AnimatedPath = Animated.createAnimatedComponent(Path) const AnimatedCircle = Animated.createAnimatedComponent(Circle) diff --git a/src/components/dialogs/Embed.tsx b/src/components/dialogs/Embed.tsx index 9ea400abe..594800c82 100644 --- a/src/components/dialogs/Embed.tsx +++ b/src/components/dialogs/Embed.tsx @@ -1,6 +1,6 @@ import {memo, useEffect, useMemo, useState} from 'react' import {View} from 'react-native' -import {AppBskyActorDefs, AppBskyFeedPost, AtUri} from '@atproto/api' +import {type AppBskyActorDefs, type AppBskyFeedPost, AtUri} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/dialogs/MutedWords.tsx b/src/components/dialogs/MutedWords.tsx index 666b93068..e289e1641 100644 --- a/src/components/dialogs/MutedWords.tsx +++ b/src/components/dialogs/MutedWords.tsx @@ -1,6 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {AppBskyActorDefs, sanitizeMutedWordValue} from '@atproto/api' +import {type AppBskyActorDefs, sanitizeMutedWordValue} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -16,7 +16,7 @@ import { native, useBreakpoints, useTheme, - ViewStyleProp, + type ViewStyleProp, web, } from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' diff --git a/src/components/dms/BlockedByListDialog.tsx b/src/components/dms/BlockedByListDialog.tsx index 2a83ea8c0..c071d0bba 100644 --- a/src/components/dms/BlockedByListDialog.tsx +++ b/src/components/dms/BlockedByListDialog.tsx @@ -1,13 +1,13 @@ import React from 'react' import {View} from 'react-native' -import {ModerationCause} from '@atproto/api' +import {type ModerationCause} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {listUriToHref} from '#/lib/strings/url-helpers' import {atoms as a, useTheme} from '#/alf' import * as Dialog from '#/components/Dialog' -import {DialogControlProps} from '#/components/Dialog' +import {type DialogControlProps} from '#/components/Dialog' import {InlineLinkText} from '#/components/Link' import * as Prompt from '#/components/Prompt' import {Text} from '#/components/Typography' diff --git a/src/components/dms/LeaveConvoPrompt.tsx b/src/components/dms/LeaveConvoPrompt.tsx index 57acd5ca7..97d8600d0 100644 --- a/src/components/dms/LeaveConvoPrompt.tsx +++ b/src/components/dms/LeaveConvoPrompt.tsx @@ -2,11 +2,11 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {StackActions, useNavigation} from '@react-navigation/native' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {isNative} from '#/platform/detection' import {useLeaveConvo} from '#/state/queries/messages/leave-conversation' import * as Toast from '#/view/com/util/Toast' -import {DialogOuterProps} from '#/components/Dialog' +import {type DialogOuterProps} from '#/components/Dialog' import * as Prompt from '#/components/Prompt' export function LeaveConvoPrompt({ diff --git a/src/components/dms/MessagesListBlockedFooter.tsx b/src/components/dms/MessagesListBlockedFooter.tsx index 9c63ef2c7..8f75f4306 100644 --- a/src/components/dms/MessagesListBlockedFooter.tsx +++ b/src/components/dms/MessagesListBlockedFooter.tsx @@ -1,6 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {ModerationDecision} from '@atproto/api' +import {type ModerationDecision} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -14,7 +14,7 @@ import {BlockedByListDialog} from '#/components/dms/BlockedByListDialog' import {LeaveConvoPrompt} from '#/components/dms/LeaveConvoPrompt' import {ReportConversationPrompt} from '#/components/dms/ReportConversationPrompt' import {Text} from '#/components/Typography' -import * as bsky from '#/types/bsky' +import type * as bsky from '#/types/bsky' export function MessagesListBlockedFooter({ recipient: initialRecipient, diff --git a/src/components/dms/ReportConversationPrompt.tsx b/src/components/dms/ReportConversationPrompt.tsx index 6bb26a60f..fed5c914c 100644 --- a/src/components/dms/ReportConversationPrompt.tsx +++ b/src/components/dms/ReportConversationPrompt.tsx @@ -1,7 +1,7 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {DialogControlProps} from '#/components/Dialog' +import {type DialogControlProps} from '#/components/Dialog' import * as Prompt from '#/components/Prompt' export function ReportConversationPrompt({ diff --git a/src/components/feeds/PostFeedVideoGridRow.tsx b/src/components/feeds/PostFeedVideoGridRow.tsx index 7f9898083..c4014fd44 100644 --- a/src/components/feeds/PostFeedVideoGridRow.tsx +++ b/src/components/feeds/PostFeedVideoGridRow.tsx @@ -2,8 +2,8 @@ import {View} from 'react-native' import {AppBskyEmbedVideo} from '@atproto/api' import {logEvent} from '#/lib/statsig/statsig' -import {FeedPostSliceItem} from '#/state/queries/post-feed' -import {VideoFeedSourceContext} from '#/screens/VideoFeed/types' +import {type FeedPostSliceItem} from '#/state/queries/post-feed' +import {type VideoFeedSourceContext} from '#/screens/VideoFeed/types' import {atoms as a, useGutters} from '#/alf' import * as Grid from '#/components/Grid' import { diff --git a/src/components/forms/DateField/index.web.tsx b/src/components/forms/DateField/index.web.tsx index 00f58202a..e9f0e9c8c 100644 --- a/src/components/forms/DateField/index.web.tsx +++ b/src/components/forms/DateField/index.web.tsx @@ -1,9 +1,9 @@ import React from 'react' -import {StyleSheet, TextInput, TextInputProps} from 'react-native' +import {StyleSheet, type TextInput, type TextInputProps} from 'react-native' // @ts-expect-error untyped import {unstable_createElement} from 'react-native-web' -import {DateFieldProps} from '#/components/forms/DateField/types' +import {type DateFieldProps} from '#/components/forms/DateField/types' import {toSimpleDateString} from '#/components/forms/DateField/utils' import * as TextField from '#/components/forms/TextField' import {CalendarDays_Stroke2_Corner0_Rounded as CalendarDays} from '#/components/icons/CalendarDays' diff --git a/src/components/forms/SearchInput.tsx b/src/components/forms/SearchInput.tsx index cbf02ac8b..618a0040e 100644 --- a/src/components/forms/SearchInput.tsx +++ b/src/components/forms/SearchInput.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {TextInput, View} from 'react-native' +import {type TextInput, View} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/components/hooks/useFollowMethods.ts b/src/components/hooks/useFollowMethods.ts index e6b3f2c47..cba617d10 100644 --- a/src/components/hooks/useFollowMethods.ts +++ b/src/components/hooks/useFollowMethods.ts @@ -2,13 +2,13 @@ import React from 'react' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {LogEvents} from '#/lib/statsig/statsig' +import {type LogEvents} from '#/lib/statsig/statsig' import {logger} from '#/logger' -import {Shadow} from '#/state/cache/types' +import {type Shadow} from '#/state/cache/types' import {useProfileFollowMutationQueue} from '#/state/queries/profile' import {useRequireAuth} from '#/state/session' import * as Toast from '#/view/com/util/Toast' -import * as bsky from '#/types/bsky' +import type * as bsky from '#/types/bsky' export function useFollowMethods({ profile, diff --git a/src/components/icons/TEMPLATE.tsx b/src/components/icons/TEMPLATE.tsx index 47a5c36b2..be161c271 100644 --- a/src/components/icons/TEMPLATE.tsx +++ b/src/components/icons/TEMPLATE.tsx @@ -1,7 +1,7 @@ import React from 'react' import Svg, {Path} from 'react-native-svg' -import {Props, useCommonSVGProps} from '#/components/icons/common' +import {type Props, useCommonSVGProps} from '#/components/icons/common' export const IconTemplate_Stroke2_Corner0_Rounded = React.forwardRef( function LogoImpl(props: Props, ref) { diff --git a/src/components/intents/VerifyEmailIntentDialog.tsx b/src/components/intents/VerifyEmailIntentDialog.tsx index c78aabb6d..ab628eeef 100644 --- a/src/components/intents/VerifyEmailIntentDialog.tsx +++ b/src/components/intents/VerifyEmailIntentDialog.tsx @@ -8,7 +8,7 @@ import {useAgent, useSession} from '#/state/session' import {atoms as a, useBreakpoints, useTheme} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' -import {DialogControlProps} from '#/components/Dialog' +import {type DialogControlProps} from '#/components/Dialog' import {Divider} from '#/components/Divider' import {ArrowRotateCounterClockwise_Stroke2_Corner0_Rounded as Resend} from '#/components/icons/ArrowRotateCounterClockwise' import {useIntentDialogs} from '#/components/intents/IntentDialogs' diff --git a/src/components/moderation/LabelsOnMe.tsx b/src/components/moderation/LabelsOnMe.tsx index f0a25959f..a55ef470f 100644 --- a/src/components/moderation/LabelsOnMe.tsx +++ b/src/components/moderation/LabelsOnMe.tsx @@ -1,11 +1,16 @@ -import {StyleProp, View, ViewStyle} from 'react-native' -import {AppBskyFeedDefs, ComAtprotoLabelDefs} from '@atproto/api' +import {type StyleProp, View, type ViewStyle} from 'react-native' +import {type AppBskyFeedDefs, type ComAtprotoLabelDefs} from '@atproto/api' import {msg, Plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useSession} from '#/state/session' import {atoms as a} from '#/alf' -import {Button, ButtonIcon, ButtonSize, ButtonText} from '#/components/Button' +import { + Button, + ButtonIcon, + type ButtonSize, + ButtonText, +} from '#/components/Button' import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfo} from '#/components/icons/CircleInfo' import { LabelsOnMeDialog, diff --git a/src/components/moderation/LabelsOnMeDialog.tsx b/src/components/moderation/LabelsOnMeDialog.tsx index 56c6af0a4..940a49590 100644 --- a/src/components/moderation/LabelsOnMeDialog.tsx +++ b/src/components/moderation/LabelsOnMeDialog.tsx @@ -1,6 +1,6 @@ import React from 'react' import {View} from 'react-native' -import {ComAtprotoLabelDefs, ComAtprotoModerationDefs} from '@atproto/api' +import {type ComAtprotoLabelDefs, ComAtprotoModerationDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useMutation} from '@tanstack/react-query' diff --git a/src/components/moderation/ModerationDetailsDialog.tsx b/src/components/moderation/ModerationDetailsDialog.tsx index 658ef48d1..d56af48e3 100644 --- a/src/components/moderation/ModerationDetailsDialog.tsx +++ b/src/components/moderation/ModerationDetailsDialog.tsx @@ -1,5 +1,5 @@ import {View} from 'react-native' -import {ModerationCause} from '@atproto/api' +import {type ModerationCause} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -12,7 +12,7 @@ import {useSession} from '#/state/session' import {atoms as a, useGutters, useTheme} from '#/alf' import * as Dialog from '#/components/Dialog' import {InlineLinkText} from '#/components/Link' -import {AppModerationCause} from '#/components/Pills' +import {type AppModerationCause} from '#/components/Pills' import {Text} from '#/components/Typography' export {useDialogControl as useModerationDetailsDialogControl} from '#/components/Dialog' diff --git a/src/components/moderation/PostAlerts.tsx b/src/components/moderation/PostAlerts.tsx index e5d30da15..7a9c38cc6 100644 --- a/src/components/moderation/PostAlerts.tsx +++ b/src/components/moderation/PostAlerts.tsx @@ -1,5 +1,5 @@ -import {StyleProp, ViewStyle} from 'react-native' -import {ModerationCause, ModerationUI} from '@atproto/api' +import {type StyleProp, type ViewStyle} from 'react-native' +import {type ModerationCause, type ModerationUI} from '@atproto/api' import {getModerationCauseKey, unique} from '#/lib/moderation' import * as Pills from '#/components/Pills' diff --git a/src/components/moderation/ProfileHeaderAlerts.tsx b/src/components/moderation/ProfileHeaderAlerts.tsx index 9aed1f13d..21359a86e 100644 --- a/src/components/moderation/ProfileHeaderAlerts.tsx +++ b/src/components/moderation/ProfileHeaderAlerts.tsx @@ -1,5 +1,5 @@ -import {StyleProp, ViewStyle} from 'react-native' -import {ModerationDecision} from '@atproto/api' +import {type StyleProp, type ViewStyle} from 'react-native' +import {type ModerationDecision} from '@atproto/api' import {getModerationCauseKey, unique} from '#/lib/moderation' import * as Pills from '#/components/Pills' diff --git a/src/components/moderation/ReportDialog/action.ts b/src/components/moderation/ReportDialog/action.ts index fde2c7898..2da6e4829 100644 --- a/src/components/moderation/ReportDialog/action.ts +++ b/src/components/moderation/ReportDialog/action.ts @@ -1,7 +1,7 @@ import { - $Typed, - ChatBskyConvoDefs, - ComAtprotoModerationCreateReport, + type $Typed, + type ChatBskyConvoDefs, + type ComAtprotoModerationCreateReport, } from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -9,8 +9,8 @@ import {useMutation} from '@tanstack/react-query' import {logger} from '#/logger' import {useAgent} from '#/state/session' -import {ReportState} from './state' -import {ParsedReportSubject} from './types' +import {type ReportState} from './state' +import {type ParsedReportSubject} from './types' export function useSubmitReportMutation() { const {_} = useLingui() diff --git a/src/components/moderation/ReportDialog/copy.ts b/src/components/moderation/ReportDialog/copy.ts index 87e199f98..11536c00c 100644 --- a/src/components/moderation/ReportDialog/copy.ts +++ b/src/components/moderation/ReportDialog/copy.ts @@ -2,7 +2,7 @@ import {useMemo} from 'react' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {ParsedReportSubject} from './types' +import {type ParsedReportSubject} from './types' export function useCopyForSubject(subject: ParsedReportSubject) { const {_} = useLingui() diff --git a/src/components/moderation/ReportDialog/state.ts b/src/components/moderation/ReportDialog/state.ts index 3f55bfb01..18ee77df8 100644 --- a/src/components/moderation/ReportDialog/state.ts +++ b/src/components/moderation/ReportDialog/state.ts @@ -1,6 +1,6 @@ -import {AppBskyLabelerDefs, ComAtprotoModerationDefs} from '@atproto/api' +import {type AppBskyLabelerDefs, ComAtprotoModerationDefs} from '@atproto/api' -import {ReportOption} from './utils/useReportOptions' +import {type ReportOption} from './utils/useReportOptions' export type ReportState = { selectedOption?: ReportOption diff --git a/src/components/moderation/ReportDialog/types.ts b/src/components/moderation/ReportDialog/types.ts index 444f01c66..e84369905 100644 --- a/src/components/moderation/ReportDialog/types.ts +++ b/src/components/moderation/ReportDialog/types.ts @@ -1,12 +1,12 @@ import { - $Typed, - AppBskyActorDefs, - AppBskyFeedDefs, - AppBskyGraphDefs, - ChatBskyConvoDefs, + type $Typed, + type AppBskyActorDefs, + type AppBskyFeedDefs, + type AppBskyGraphDefs, + type ChatBskyConvoDefs, } from '@atproto/api' -import * as Dialog from '#/components/Dialog' +import type * as Dialog from '#/components/Dialog' export type ReportSubject = | $Typed<AppBskyActorDefs.ProfileViewBasic> diff --git a/src/components/moderation/ReportDialog/utils/parseReportSubject.ts b/src/components/moderation/ReportDialog/utils/parseReportSubject.ts index b79e49695..baab1934f 100644 --- a/src/components/moderation/ReportDialog/utils/parseReportSubject.ts +++ b/src/components/moderation/ReportDialog/utils/parseReportSubject.ts @@ -6,8 +6,8 @@ import { } from '@atproto/api' import { - ParsedReportSubject, - ReportSubject, + type ParsedReportSubject, + type ReportSubject, } from '#/components/moderation/ReportDialog/types' import * as bsky from '#/types/bsky' diff --git a/src/components/moderation/ScreenHider.tsx b/src/components/moderation/ScreenHider.tsx index 5680b60c2..dde07eb94 100644 --- a/src/components/moderation/ScreenHider.tsx +++ b/src/components/moderation/ScreenHider.tsx @@ -1,18 +1,18 @@ import React from 'react' import { - StyleProp, + type StyleProp, TouchableWithoutFeedback, View, - ViewStyle, + type ViewStyle, } from 'react-native' -import {ModerationUI} from '@atproto/api' +import {type ModerationUI} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {useNavigation} from '@react-navigation/native' import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' import {useModerationCauseDescription} from '#/lib/moderation/useModerationCauseDescription' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {CenteredView} from '#/view/com/util/Views' import {atoms as a, useTheme, web} from '#/alf' import {Button, ButtonText} from '#/components/Button' |