From 53e43a957c2e0f3f020c34653cbf5029ec6dd8bb Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Tue, 9 Sep 2025 18:38:21 +0300 Subject: run `yarn lint --fix` (#9013) --- src/view/com/composer/AltTextCounterWrapper.tsx | 2 +- src/view/com/composer/KeyboardAccessory.tsx | 2 +- src/view/com/composer/char-progress/CharProgress.tsx | 7 ++++++- src/view/com/composer/photos/SelectGifBtn.tsx | 2 +- src/view/com/composer/text-input/text-input-util.ts | 2 +- src/view/com/composer/text-input/web/LinkDecorator.ts | 2 +- src/view/com/composer/text-input/web/TagDecorator.ts | 2 +- src/view/com/composer/threadgate/ThreadgateBtn.tsx | 8 ++++---- src/view/com/composer/videos/SubtitleFilePicker.tsx | 3 ++- src/view/com/composer/videos/VideoPreview.web.tsx | 4 ++-- src/view/com/composer/videos/VideoTranscodeProgress.tsx | 2 +- src/view/com/composer/videos/pickVideo.web.ts | 2 +- src/view/com/lightbox/ImageViewing/@types/index.ts | 4 ++-- .../ImageViewing/components/ImageDefaultHeader.tsx | 2 +- .../components/ImageItem/ImageItem.android.tsx | 14 +++++++------- .../ImageViewing/components/ImageItem/ImageItem.ios.tsx | 10 +++++----- .../ImageViewing/components/ImageItem/ImageItem.tsx | 12 ++++++------ src/view/com/lightbox/ImageViewing/transforms.ts | 2 +- src/view/com/modals/InviteCodes.tsx | 6 +++--- src/view/com/modals/UserAddRemoveLists.tsx | 4 ++-- src/view/com/post-thread/PostLikedBy.tsx | 2 +- src/view/com/post-thread/PostQuotes.tsx | 4 ++-- src/view/com/post-thread/PostRepostedBy.tsx | 2 +- src/view/com/posts/CustomFeedEmptyState.tsx | 4 ++-- src/view/com/posts/FollowingEmptyState.tsx | 4 ++-- src/view/com/posts/FollowingEndOfFeed.tsx | 4 ++-- src/view/com/profile/ProfileFollowers.tsx | 2 +- src/view/com/profile/ProfileFollows.tsx | 2 +- src/view/com/util/Alert.web.tsx | 2 +- src/view/com/util/BottomSheetCustomBackdrop.tsx | 5 +++-- src/view/com/util/EmptyState.tsx | 6 +++--- src/view/com/util/EmptyStateWithButton.tsx | 4 ++-- src/view/com/util/ErrorBoundary.tsx | 4 ++-- src/view/com/util/FeedInfoText.tsx | 4 ++-- src/view/com/util/LoadMoreRetryBtn.tsx | 2 +- src/view/com/util/MainScrollProvider.tsx | 2 +- src/view/com/util/PressableWithHover.tsx | 11 ++++++++--- src/view/com/util/Views.tsx | 6 +++--- src/view/com/util/WebAuxClickWrapper.tsx | 2 +- src/view/com/util/error/ErrorMessage.tsx | 6 +++--- src/view/com/util/error/ErrorScreen.tsx | 2 +- src/view/com/util/fab/FAB.web.tsx | 2 +- src/view/com/util/images/Image.tsx | 2 +- src/view/com/util/layouts/LoggedOutLayout.tsx | 2 +- 44 files changed, 95 insertions(+), 83 deletions(-) (limited to 'src/view/com') diff --git a/src/view/com/composer/AltTextCounterWrapper.tsx b/src/view/com/composer/AltTextCounterWrapper.tsx index d69252f4b..da3c14920 100644 --- a/src/view/com/composer/AltTextCounterWrapper.tsx +++ b/src/view/com/composer/AltTextCounterWrapper.tsx @@ -1,5 +1,5 @@ -import React from 'react' import {View} from 'react-native' +import type React from 'react' import {MAX_ALT_TEXT} from '#/lib/constants' import {CharProgress} from '#/view/com/composer/char-progress/CharProgress' diff --git a/src/view/com/composer/KeyboardAccessory.tsx b/src/view/com/composer/KeyboardAccessory.tsx index 983a87dae..f3fb761dc 100644 --- a/src/view/com/composer/KeyboardAccessory.tsx +++ b/src/view/com/composer/KeyboardAccessory.tsx @@ -1,7 +1,7 @@ -import React from 'react' import {View} from 'react-native' import {KeyboardStickyView} from 'react-native-keyboard-controller' import {useSafeAreaInsets} from 'react-native-safe-area-context' +import type React from 'react' import {isWeb} from '#/platform/detection' import {atoms as a, useTheme} from '#/alf' diff --git a/src/view/com/composer/char-progress/CharProgress.tsx b/src/view/com/composer/char-progress/CharProgress.tsx index f2734e4ec..8920132a5 100644 --- a/src/view/com/composer/char-progress/CharProgress.tsx +++ b/src/view/com/composer/char-progress/CharProgress.tsx @@ -1,4 +1,9 @@ -import {StyleProp, TextStyle, View, ViewStyle} from 'react-native' +import { + type StyleProp, + type TextStyle, + View, + type ViewStyle, +} from 'react-native' // @ts-ignore no type definition -prf import ProgressCircle from 'react-native-progress/Circle' // @ts-ignore no type definition -prf diff --git a/src/view/com/composer/photos/SelectGifBtn.tsx b/src/view/com/composer/photos/SelectGifBtn.tsx index 3fb0e00d2..65e0ed8ce 100644 --- a/src/view/com/composer/photos/SelectGifBtn.tsx +++ b/src/view/com/composer/photos/SelectGifBtn.tsx @@ -4,7 +4,7 @@ import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {logEvent} from '#/lib/statsig/statsig' -import {Gif} from '#/state/queries/tenor' +import {type Gif} from '#/state/queries/tenor' import {atoms as a, useTheme} from '#/alf' import {Button} from '#/components/Button' import {GifSelectDialog} from '#/components/dialogs/GifSelect' diff --git a/src/view/com/composer/text-input/text-input-util.ts b/src/view/com/composer/text-input/text-input-util.ts index 7268e10f0..71db8c323 100644 --- a/src/view/com/composer/text-input/text-input-util.ts +++ b/src/view/com/composer/text-input/text-input-util.ts @@ -1,4 +1,4 @@ -import {AppBskyRichtextFacet, RichText} from '@atproto/api' +import {type AppBskyRichtextFacet, type RichText} from '@atproto/api' export type LinkFacetMatch = { rt: RichText diff --git a/src/view/com/composer/text-input/web/LinkDecorator.ts b/src/view/com/composer/text-input/web/LinkDecorator.ts index af38d6b05..4843f0ddf 100644 --- a/src/view/com/composer/text-input/web/LinkDecorator.ts +++ b/src/view/com/composer/text-input/web/LinkDecorator.ts @@ -16,7 +16,7 @@ import {URL_REGEX} from '@atproto/api' import {Mark} from '@tiptap/core' -import {Node as ProsemirrorNode} from '@tiptap/pm/model' +import {type Node as ProsemirrorNode} from '@tiptap/pm/model' import {Plugin, PluginKey} from '@tiptap/pm/state' import {Decoration, DecorationSet} from '@tiptap/pm/view' diff --git a/src/view/com/composer/text-input/web/TagDecorator.ts b/src/view/com/composer/text-input/web/TagDecorator.ts index 9225fd6bf..5af70de6d 100644 --- a/src/view/com/composer/text-input/web/TagDecorator.ts +++ b/src/view/com/composer/text-input/web/TagDecorator.ts @@ -16,7 +16,7 @@ import {TAG_REGEX, TRAILING_PUNCTUATION_REGEX} from '@atproto/api' import {Mark} from '@tiptap/core' -import {Node as ProsemirrorNode} from '@tiptap/pm/model' +import {type Node as ProsemirrorNode} from '@tiptap/pm/model' import {Plugin, PluginKey} from '@tiptap/pm/state' import {Decoration, DecorationSet} from '@tiptap/pm/view' diff --git a/src/view/com/composer/threadgate/ThreadgateBtn.tsx b/src/view/com/composer/threadgate/ThreadgateBtn.tsx index 4130cc7e4..4f46351b2 100644 --- a/src/view/com/composer/threadgate/ThreadgateBtn.tsx +++ b/src/view/com/composer/threadgate/ThreadgateBtn.tsx @@ -1,11 +1,11 @@ -import {Keyboard, StyleProp, ViewStyle} from 'react-native' -import {AnimatedStyle} from 'react-native-reanimated' -import {AppBskyFeedPostgate} from '@atproto/api' +import {Keyboard, type StyleProp, type ViewStyle} from 'react-native' +import {type AnimatedStyle} from 'react-native-reanimated' +import {type AppBskyFeedPostgate} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' import {isNative} from '#/platform/detection' -import {ThreadgateAllowUISetting} from '#/state/queries/threadgate' +import {type ThreadgateAllowUISetting} from '#/state/queries/threadgate' import {native} from '#/alf' import {Button, ButtonIcon, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' diff --git a/src/view/com/composer/videos/SubtitleFilePicker.tsx b/src/view/com/composer/videos/SubtitleFilePicker.tsx index e49189f9b..256bc1600 100644 --- a/src/view/com/composer/videos/SubtitleFilePicker.tsx +++ b/src/view/com/composer/videos/SubtitleFilePicker.tsx @@ -1,7 +1,8 @@ -import React, {useRef} from 'react' +import {useRef} from 'react' import {View} from 'react-native' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' +import type React from 'react' import {logger} from '#/logger' import * as Toast from '#/view/com/util/Toast' diff --git a/src/view/com/composer/videos/VideoPreview.web.tsx b/src/view/com/composer/videos/VideoPreview.web.tsx index f20f8b383..979fbf52f 100644 --- a/src/view/com/composer/videos/VideoPreview.web.tsx +++ b/src/view/com/composer/videos/VideoPreview.web.tsx @@ -1,9 +1,9 @@ import {View} from 'react-native' -import {ImagePickerAsset} from 'expo-image-picker' +import {type ImagePickerAsset} from 'expo-image-picker' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' -import {CompressedVideo} from '#/lib/media/video/types' +import {type CompressedVideo} from '#/lib/media/video/types' import {clamp} from '#/lib/numbers' import {useAutoplayDisabled} from '#/state/preferences' import {ExternalEmbedRemoveBtn} from '#/view/com/composer/ExternalEmbedRemoveBtn' diff --git a/src/view/com/composer/videos/VideoTranscodeProgress.tsx b/src/view/com/composer/videos/VideoTranscodeProgress.tsx index f408be720..0a107d878 100644 --- a/src/view/com/composer/videos/VideoTranscodeProgress.tsx +++ b/src/view/com/composer/videos/VideoTranscodeProgress.tsx @@ -1,7 +1,7 @@ import {View} from 'react-native' // @ts-expect-error no type definition import ProgressPie from 'react-native-progress/Pie' -import {ImagePickerAsset} from 'expo-image-picker' +import {type ImagePickerAsset} from 'expo-image-picker' import {clamp} from '#/lib/numbers' import {isWeb} from '#/platform/detection' diff --git a/src/view/com/composer/videos/pickVideo.web.ts b/src/view/com/composer/videos/pickVideo.web.ts index 56a38fa56..c358727ef 100644 --- a/src/view/com/composer/videos/pickVideo.web.ts +++ b/src/view/com/composer/videos/pickVideo.web.ts @@ -1,4 +1,4 @@ -import {ImagePickerAsset, ImagePickerResult} from 'expo-image-picker' +import {type ImagePickerAsset, type ImagePickerResult} from 'expo-image-picker' import {SUPPORTED_MIME_TYPES} from '#/lib/constants' diff --git a/src/view/com/lightbox/ImageViewing/@types/index.ts b/src/view/com/lightbox/ImageViewing/@types/index.ts index 779b95bfc..55b3db8fe 100644 --- a/src/view/com/lightbox/ImageViewing/@types/index.ts +++ b/src/view/com/lightbox/ImageViewing/@types/index.ts @@ -6,8 +6,8 @@ * */ -import {TransformsStyle} from 'react-native' -import {MeasuredDimensions} from 'react-native-reanimated' +import {type TransformsStyle} from 'react-native' +import {type MeasuredDimensions} from 'react-native-reanimated' export type Dimensions = { width: number diff --git a/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx b/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx index 3089b6d3f..cdee8a826 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageDefaultHeader.tsx @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. * */ -import {StyleSheet, TouchableOpacity, ViewStyle} from 'react-native' +import {StyleSheet, TouchableOpacity, type ViewStyle} from 'react-native' import {SafeAreaView} from 'react-native-safe-area-context' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {msg} from '@lingui/macro' diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx index 925158773..9ce3f5242 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.android.tsx @@ -3,11 +3,11 @@ import {ActivityIndicator, StyleSheet} from 'react-native' import { Gesture, GestureDetector, - PanGesture, + type PanGesture, } from 'react-native-gesture-handler' import Animated, { runOnJS, - SharedValue, + type SharedValue, useAnimatedReaction, useAnimatedRef, useAnimatedStyle, @@ -16,10 +16,10 @@ import Animated, { } from 'react-native-reanimated' import {Image} from 'expo-image' -import type { - Dimensions as ImageDimensions, - ImageSource, - Transform, +import { + type Dimensions as ImageDimensions, + type ImageSource, + type Transform, } from '../../@types' import { applyRounding, @@ -28,7 +28,7 @@ import { prependPinch, prependTransform, readTransform, - TransformMatrix, + type TransformMatrix, } from '../../transforms' const MIN_SCREEN_ZOOM = 2 diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx index c103e131b..c8bf1fcce 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.ios.tsx @@ -11,11 +11,11 @@ import {ActivityIndicator, StyleSheet} from 'react-native' import { Gesture, GestureDetector, - PanGesture, + type PanGesture, } from 'react-native-gesture-handler' import Animated, { runOnJS, - SharedValue, + type SharedValue, useAnimatedProps, useAnimatedReaction, useAnimatedRef, @@ -27,9 +27,9 @@ import {Image} from 'expo-image' import {useAnimatedScrollHandler} from '#/lib/hooks/useAnimatedScrollHandler_FIXED' import { - Dimensions as ImageDimensions, - ImageSource, - Transform, + type Dimensions as ImageDimensions, + type ImageSource, + type Transform, } from '../../@types' const MAX_ORIGINAL_IMAGE_ZOOM = 2 diff --git a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx index b41e16383..c33151723 100644 --- a/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx +++ b/src/view/com/lightbox/ImageViewing/components/ImageItem/ImageItem.tsx @@ -2,14 +2,14 @@ import React from 'react' import {View} from 'react-native' -import {PanGesture} from 'react-native-gesture-handler' -import {SharedValue} from 'react-native-reanimated' +import {type PanGesture} from 'react-native-gesture-handler' +import {type SharedValue} from 'react-native-reanimated' -import {Dimensions} from '#/lib/media/types' +import {type Dimensions} from '#/lib/media/types' import { - Dimensions as ImageDimensions, - ImageSource, - Transform, + type Dimensions as ImageDimensions, + type ImageSource, + type Transform, } from '../../@types' type Props = { diff --git a/src/view/com/lightbox/ImageViewing/transforms.ts b/src/view/com/lightbox/ImageViewing/transforms.ts index 05476678f..ae6e4aed8 100644 --- a/src/view/com/lightbox/ImageViewing/transforms.ts +++ b/src/view/com/lightbox/ImageViewing/transforms.ts @@ -1,4 +1,4 @@ -import type {Position} from './@types' +import {type Position} from './@types' export type TransformMatrix = [ number, diff --git a/src/view/com/modals/InviteCodes.tsx b/src/view/com/modals/InviteCodes.tsx index 60020f996..93f749062 100644 --- a/src/view/com/modals/InviteCodes.tsx +++ b/src/view/com/modals/InviteCodes.tsx @@ -6,10 +6,10 @@ import { View, } from 'react-native' import {setStringAsync} from 'expo-clipboard' -import {ComAtprotoServerDefs} from '@atproto/api' +import {type ComAtprotoServerDefs} from '@atproto/api' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -22,7 +22,7 @@ import {isWeb} from '#/platform/detection' import {useInvitesAPI, useInvitesState} from '#/state/invites' import {useModalControls} from '#/state/modals' import { - InviteCodesQueryResponse, + type InviteCodesQueryResponse, useInviteCodesQuery, } from '#/state/queries/invites' import {ErrorMessage} from '../util/error/ErrorMessage' diff --git a/src/view/com/modals/UserAddRemoveLists.tsx b/src/view/com/modals/UserAddRemoveLists.tsx index b0b76644f..7c20b50c7 100644 --- a/src/view/com/modals/UserAddRemoveLists.tsx +++ b/src/view/com/modals/UserAddRemoveLists.tsx @@ -5,7 +5,7 @@ import { useWindowDimensions, View, } from 'react-native' -import {AppBskyGraphDefs as GraphDefs} from '@atproto/api' +import {type AppBskyGraphDefs as GraphDefs} from '@atproto/api' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -18,7 +18,7 @@ import {isAndroid, isMobileWeb, isWeb} from '#/platform/detection' import {useModalControls} from '#/state/modals' import { getMembership, - ListMembersip, + type ListMembersip, useDangerousListMembershipsQuery, useListMembershipAddMutation, useListMembershipRemoveMutation, diff --git a/src/view/com/post-thread/PostLikedBy.tsx b/src/view/com/post-thread/PostLikedBy.tsx index b9051a9c6..d6c41ced1 100644 --- a/src/view/com/post-thread/PostLikedBy.tsx +++ b/src/view/com/post-thread/PostLikedBy.tsx @@ -1,5 +1,5 @@ import {useCallback, useMemo, useState} 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/view/com/post-thread/PostQuotes.tsx b/src/view/com/post-thread/PostQuotes.tsx index 82619a8a5..8f178968d 100644 --- a/src/view/com/post-thread/PostQuotes.tsx +++ b/src/view/com/post-thread/PostQuotes.tsx @@ -1,9 +1,9 @@ import {useCallback, useState} from 'react' import { - AppBskyFeedDefs, + type AppBskyFeedDefs, AppBskyFeedPost, moderatePost, - ModerationDecision, + type ModerationDecision, } from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/post-thread/PostRepostedBy.tsx b/src/view/com/post-thread/PostRepostedBy.tsx index c27e37f49..e15d9a0f1 100644 --- a/src/view/com/post-thread/PostRepostedBy.tsx +++ b/src/view/com/post-thread/PostRepostedBy.tsx @@ -1,5 +1,5 @@ import {useCallback, useMemo, useState} from 'react' -import {AppBskyActorDefs as ActorDefs} from '@atproto/api' +import {type AppBskyActorDefs as ActorDefs} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/posts/CustomFeedEmptyState.tsx b/src/view/com/posts/CustomFeedEmptyState.tsx index 1d216dd29..580e5b2e4 100644 --- a/src/view/com/posts/CustomFeedEmptyState.tsx +++ b/src/view/com/posts/CustomFeedEmptyState.tsx @@ -2,14 +2,14 @@ import React from 'react' import {StyleSheet, View} from 'react-native' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {Trans} from '@lingui/macro' import {useNavigation} from '@react-navigation/native' import {usePalette} from '#/lib/hooks/usePalette' import {MagnifyingGlassIcon} from '#/lib/icons' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {s} from '#/lib/styles' import {isWeb} from '#/platform/detection' import {Button} from '../util/forms/Button' diff --git a/src/view/com/posts/FollowingEmptyState.tsx b/src/view/com/posts/FollowingEmptyState.tsx index 3f330b327..352cc1dc0 100644 --- a/src/view/com/posts/FollowingEmptyState.tsx +++ b/src/view/com/posts/FollowingEmptyState.tsx @@ -2,14 +2,14 @@ import React from 'react' import {StyleSheet, View} from 'react-native' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {Trans} from '@lingui/macro' import {useNavigation} from '@react-navigation/native' import {usePalette} from '#/lib/hooks/usePalette' import {MagnifyingGlassIcon} from '#/lib/icons' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {s} from '#/lib/styles' import {isWeb} from '#/platform/detection' import {Button} from '../util/forms/Button' diff --git a/src/view/com/posts/FollowingEndOfFeed.tsx b/src/view/com/posts/FollowingEndOfFeed.tsx index 4abb3c1f5..e3c84d782 100644 --- a/src/view/com/posts/FollowingEndOfFeed.tsx +++ b/src/view/com/posts/FollowingEndOfFeed.tsx @@ -2,13 +2,13 @@ import React from 'react' import {Dimensions, StyleSheet, View} from 'react-native' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {Trans} from '@lingui/macro' import {useNavigation} from '@react-navigation/native' import {usePalette} from '#/lib/hooks/usePalette' -import {NavigationProp} from '#/lib/routes/types' +import {type NavigationProp} from '#/lib/routes/types' import {s} from '#/lib/styles' import {isWeb} from '#/platform/detection' import {Button} from '../util/forms/Button' diff --git a/src/view/com/profile/ProfileFollowers.tsx b/src/view/com/profile/ProfileFollowers.tsx index d6b764656..dfb63909e 100644 --- a/src/view/com/profile/ProfileFollowers.tsx +++ b/src/view/com/profile/ProfileFollowers.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {AppBskyActorDefs as ActorDefs} from '@atproto/api' +import {type AppBskyActorDefs as ActorDefs} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/profile/ProfileFollows.tsx b/src/view/com/profile/ProfileFollows.tsx index d67a7261a..80aba11b2 100644 --- a/src/view/com/profile/ProfileFollows.tsx +++ b/src/view/com/profile/ProfileFollows.tsx @@ -1,5 +1,5 @@ import React from 'react' -import {AppBskyActorDefs as ActorDefs} from '@atproto/api' +import {type AppBskyActorDefs as ActorDefs} from '@atproto/api' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/util/Alert.web.tsx b/src/view/com/util/Alert.web.tsx index bf2456504..448879173 100644 --- a/src/view/com/util/Alert.web.tsx +++ b/src/view/com/util/Alert.web.tsx @@ -1,4 +1,4 @@ -import {AlertButton, AlertStatic} from 'react-native' +import {type AlertButton, type AlertStatic} from 'react-native' class WebAlert implements Pick { public alert(title: string, message?: string, buttons?: AlertButton[]): void { diff --git a/src/view/com/util/BottomSheetCustomBackdrop.tsx b/src/view/com/util/BottomSheetCustomBackdrop.tsx index 86751861f..cacbfcc5a 100644 --- a/src/view/com/util/BottomSheetCustomBackdrop.tsx +++ b/src/view/com/util/BottomSheetCustomBackdrop.tsx @@ -1,13 +1,14 @@ -import React, {useMemo} from 'react' +import {useMemo} from 'react' import {TouchableWithoutFeedback} from 'react-native' import Animated, { Extrapolation, interpolate, useAnimatedStyle, } from 'react-native-reanimated' -import {BottomSheetBackdropProps} from '@discord/bottom-sheet/src' +import {type BottomSheetBackdropProps} from '@discord/bottom-sheet/src' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' +import type React from 'react' export function createCustomBackdrop( onClose?: (() => void) | undefined, diff --git a/src/view/com/util/EmptyState.tsx b/src/view/com/util/EmptyState.tsx index 6b2600a40..a3d740e13 100644 --- a/src/view/com/util/EmptyState.tsx +++ b/src/view/com/util/EmptyState.tsx @@ -1,8 +1,8 @@ -import {StyleProp, StyleSheet, View, ViewStyle} from 'react-native' -import {IconProp} from '@fortawesome/fontawesome-svg-core' +import {type StyleProp, StyleSheet, View, type ViewStyle} from 'react-native' +import {type IconProp} from '@fortawesome/fontawesome-svg-core' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {usePalette} from '#/lib/hooks/usePalette' diff --git a/src/view/com/util/EmptyStateWithButton.tsx b/src/view/com/util/EmptyStateWithButton.tsx index fcac6df08..5c6ce94a6 100644 --- a/src/view/com/util/EmptyStateWithButton.tsx +++ b/src/view/com/util/EmptyStateWithButton.tsx @@ -1,8 +1,8 @@ import {StyleSheet, View} from 'react-native' -import {IconProp} from '@fortawesome/fontawesome-svg-core' +import {type IconProp} from '@fortawesome/fontawesome-svg-core' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {usePalette} from '#/lib/hooks/usePalette' diff --git a/src/view/com/util/ErrorBoundary.tsx b/src/view/com/util/ErrorBoundary.tsx index c4211ffbc..87e351f5e 100644 --- a/src/view/com/util/ErrorBoundary.tsx +++ b/src/view/com/util/ErrorBoundary.tsx @@ -1,5 +1,5 @@ -import {Component, ErrorInfo, ReactNode} from 'react' -import {StyleProp, ViewStyle} from 'react-native' +import {Component, type ErrorInfo, type ReactNode} from 'react' +import {type StyleProp, type ViewStyle} from 'react-native' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/util/FeedInfoText.tsx b/src/view/com/util/FeedInfoText.tsx index 55eb1bad4..3ad05facb 100644 --- a/src/view/com/util/FeedInfoText.tsx +++ b/src/view/com/util/FeedInfoText.tsx @@ -1,7 +1,7 @@ -import {StyleProp, StyleSheet, TextStyle} from 'react-native' +import {type StyleProp, StyleSheet, type TextStyle} from 'react-native' import {sanitizeDisplayName} from '#/lib/strings/display-names' -import {TypographyVariant} from '#/lib/ThemeContext' +import {type TypographyVariant} from '#/lib/ThemeContext' import {useFeedSourceInfoQuery} from '#/state/queries/feed' import {TextLinkOnWebOnly} from './Link' import {LoadingPlaceholder} from './LoadingPlaceholder' diff --git a/src/view/com/util/LoadMoreRetryBtn.tsx b/src/view/com/util/LoadMoreRetryBtn.tsx index 07bd733ea..240d5aa34 100644 --- a/src/view/com/util/LoadMoreRetryBtn.tsx +++ b/src/view/com/util/LoadMoreRetryBtn.tsx @@ -1,7 +1,7 @@ import {StyleSheet} from 'react-native' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {usePalette} from '#/lib/hooks/usePalette' diff --git a/src/view/com/util/MainScrollProvider.tsx b/src/view/com/util/MainScrollProvider.tsx index e2538eaab..d8596b6f3 100644 --- a/src/view/com/util/MainScrollProvider.tsx +++ b/src/view/com/util/MainScrollProvider.tsx @@ -1,5 +1,5 @@ import React, {useCallback, useEffect} from 'react' -import {NativeScrollEvent} from 'react-native' +import {type NativeScrollEvent} from 'react-native' import {interpolate, useSharedValue, withSpring} from 'react-native-reanimated' import EventEmitter from 'eventemitter3' diff --git a/src/view/com/util/PressableWithHover.tsx b/src/view/com/util/PressableWithHover.tsx index 19a1968cc..f4006a526 100644 --- a/src/view/com/util/PressableWithHover.tsx +++ b/src/view/com/util/PressableWithHover.tsx @@ -1,6 +1,11 @@ -import {forwardRef, PropsWithChildren} from 'react' -import {Pressable, PressableProps, StyleProp, ViewStyle} from 'react-native' -import {View} from 'react-native' +import {forwardRef, type PropsWithChildren} from 'react' +import { + Pressable, + type PressableProps, + type StyleProp, + type ViewStyle, +} from 'react-native' +import {type View} from 'react-native' import {addStyle} from '#/lib/styles' import {useInteractionState} from '#/components/hooks/useInteractionState' diff --git a/src/view/com/util/Views.tsx b/src/view/com/util/Views.tsx index c9ba0728c..38c3f2090 100644 --- a/src/view/com/util/Views.tsx +++ b/src/view/com/util/Views.tsx @@ -1,8 +1,8 @@ import {forwardRef} from 'react' -import {FlatListComponent} from 'react-native' -import {View, ViewProps} from 'react-native' +import {type FlatListComponent} from 'react-native' +import {View, type ViewProps} from 'react-native' import Animated from 'react-native-reanimated' -import {FlatListPropsWithLayout} from 'react-native-reanimated' +import {type FlatListPropsWithLayout} from 'react-native-reanimated' // If you explode these into functions, don't forget to forwardRef! diff --git a/src/view/com/util/WebAuxClickWrapper.tsx b/src/view/com/util/WebAuxClickWrapper.tsx index 8105a8518..6ea9b3bec 100644 --- a/src/view/com/util/WebAuxClickWrapper.tsx +++ b/src/view/com/util/WebAuxClickWrapper.tsx @@ -1,5 +1,5 @@ -import React from 'react' import {Platform} from 'react-native' +import type React from 'react' const onMouseUp = (e: React.MouseEvent & {target: HTMLElement}) => { // Only handle whenever it is the middle button diff --git a/src/view/com/util/error/ErrorMessage.tsx b/src/view/com/util/error/ErrorMessage.tsx index 50e55e70c..529406996 100644 --- a/src/view/com/util/error/ErrorMessage.tsx +++ b/src/view/com/util/error/ErrorMessage.tsx @@ -1,13 +1,13 @@ import { - StyleProp, + type StyleProp, StyleSheet, TouchableOpacity, View, - ViewStyle, + type ViewStyle, } from 'react-native' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/util/error/ErrorScreen.tsx b/src/view/com/util/error/ErrorScreen.tsx index e9b0e50a3..26342ec75 100644 --- a/src/view/com/util/error/ErrorScreen.tsx +++ b/src/view/com/util/error/ErrorScreen.tsx @@ -1,7 +1,7 @@ import {View} from 'react-native' import { FontAwesomeIcon, - FontAwesomeIconStyle, + type FontAwesomeIconStyle, } from '@fortawesome/react-native-fontawesome' import {msg, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' diff --git a/src/view/com/util/fab/FAB.web.tsx b/src/view/com/util/fab/FAB.web.tsx index b9f3a0b07..976c19e7d 100644 --- a/src/view/com/util/fab/FAB.web.tsx +++ b/src/view/com/util/fab/FAB.web.tsx @@ -1,7 +1,7 @@ import {View} from 'react-native' import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries' -import {FABInner, FABProps} from './FABInner' +import {FABInner, type FABProps} from './FABInner' export const FAB = (_opts: FABProps) => { const {isDesktop} = useWebMediaQueries() diff --git a/src/view/com/util/images/Image.tsx b/src/view/com/util/images/Image.tsx index 94563ef9c..ece0fbb04 100644 --- a/src/view/com/util/images/Image.tsx +++ b/src/view/com/util/images/Image.tsx @@ -1,4 +1,4 @@ -import {Image, ImageProps, ImageSource} from 'expo-image' +import {Image, type ImageProps, type ImageSource} from 'expo-image' interface HighPriorityImageProps extends ImageProps { source: ImageSource diff --git a/src/view/com/util/layouts/LoggedOutLayout.tsx b/src/view/com/util/layouts/LoggedOutLayout.tsx index aadabd8cb..2ec17799f 100644 --- a/src/view/com/util/layouts/LoggedOutLayout.tsx +++ b/src/view/com/util/layouts/LoggedOutLayout.tsx @@ -1,5 +1,5 @@ -import React from 'react' import {ScrollView, StyleSheet, View} from 'react-native' +import type React from 'react' import {useColorSchemeStyle} from '#/lib/hooks/useColorSchemeStyle' import {useIsKeyboardVisible} from '#/lib/hooks/useIsKeyboardVisible' -- cgit 1.4.1