run yarn lint --fix (#9013)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
AppBskyFeedDefs,
|
||||
AppBskyFeedGetFeed as GetCustomFeed,
|
||||
type AppBskyFeedDefs,
|
||||
type AppBskyFeedGetFeed as GetCustomFeed,
|
||||
BskyAgent,
|
||||
jsonStringToLex,
|
||||
} from '@atproto/api'
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
getAppLanguageAsContentLanguage,
|
||||
getContentLanguages,
|
||||
} from '#/state/preferences/languages'
|
||||
import {FeedAPI, FeedAPIResponse} from './types'
|
||||
import {type FeedAPI, type FeedAPIResponse} from './types'
|
||||
import {createBskyTopicsHeader, isBlueskyOwnedFeed} from './utils'
|
||||
|
||||
export class CustomFeedAPI implements FeedAPI {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {AppBskyFeedDefs, BskyAgent} from '@atproto/api'
|
||||
import {type AppBskyFeedDefs, type BskyAgent} from '@atproto/api'
|
||||
|
||||
import {FeedAPI, FeedAPIResponse} from './types'
|
||||
import {type FeedAPI, type FeedAPIResponse} from './types'
|
||||
|
||||
export class FollowingFeedAPI implements FeedAPI {
|
||||
agent: BskyAgent
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import {
|
||||
AppBskyFeedDefs,
|
||||
AppBskyFeedGetActorLikes as GetActorLikes,
|
||||
BskyAgent,
|
||||
type AppBskyFeedDefs,
|
||||
type AppBskyFeedGetActorLikes as GetActorLikes,
|
||||
type BskyAgent,
|
||||
} from '@atproto/api'
|
||||
|
||||
import {FeedAPI, FeedAPIResponse} from './types'
|
||||
import {type FeedAPI, type FeedAPIResponse} from './types'
|
||||
|
||||
export class LikesFeedAPI implements FeedAPI {
|
||||
agent: BskyAgent
|
||||
|
||||
@@ -1,14 +1,22 @@
|
||||
import {AppBskyFeedDefs, AppBskyFeedGetTimeline, BskyAgent} from '@atproto/api'
|
||||
import {
|
||||
type AppBskyFeedDefs,
|
||||
type AppBskyFeedGetTimeline,
|
||||
type BskyAgent,
|
||||
} from '@atproto/api'
|
||||
import shuffle from 'lodash.shuffle'
|
||||
|
||||
import {bundleAsync} from '#/lib/async/bundle'
|
||||
import {timeout} from '#/lib/async/timeout'
|
||||
import {feedUriToHref} from '#/lib/strings/url-helpers'
|
||||
import {getContentLanguages} from '#/state/preferences/languages'
|
||||
import {FeedParams} from '#/state/queries/post-feed'
|
||||
import {type FeedParams} from '#/state/queries/post-feed'
|
||||
import {FeedTuner} from '../feed-manip'
|
||||
import {FeedTunerFn} from '../feed-manip'
|
||||
import {FeedAPI, FeedAPIResponse, ReasonFeedSource} from './types'
|
||||
import {type FeedTunerFn} from '../feed-manip'
|
||||
import {
|
||||
type FeedAPI,
|
||||
type FeedAPIResponse,
|
||||
type ReasonFeedSource,
|
||||
} from './types'
|
||||
import {createBskyTopicsHeader, isBlueskyOwnedFeed} from './utils'
|
||||
|
||||
const REQUEST_WAIT_MS = 500 // 500ms
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {AppBskyFeedDefs} from '@atproto/api'
|
||||
import {type AppBskyFeedDefs} from '@atproto/api'
|
||||
|
||||
export interface FeedAPIResponse {
|
||||
cursor?: string
|
||||
|
||||
@@ -2,7 +2,7 @@ import {AtUri} from '@atproto/api'
|
||||
|
||||
import {BSKY_FEED_OWNER_DIDS} from '#/lib/constants'
|
||||
import {isWeb} from '#/platform/detection'
|
||||
import {UsePreferencesQueryResponse} from '#/state/queries/preferences'
|
||||
import {type UsePreferencesQueryResponse} from '#/state/queries/preferences'
|
||||
|
||||
let debugTopics = ''
|
||||
if (isWeb && typeof window !== 'undefined') {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {copyAsync} from 'expo-file-system'
|
||||
import {BskyAgent, ComAtprotoRepoUploadBlob} from '@atproto/api'
|
||||
import {type BskyAgent, type ComAtprotoRepoUploadBlob} from '@atproto/api'
|
||||
|
||||
import {safeDeleteAsync} from '#/lib/media/manip'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {BskyAgent, ComAtprotoRepoUploadBlob} from '@atproto/api'
|
||||
import {type BskyAgent, type ComAtprotoRepoUploadBlob} from '@atproto/api'
|
||||
|
||||
/**
|
||||
* @note It is recommended, on web, to use the `file` instance of the file
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {ImageRequireSource} from 'react-native'
|
||||
import {type ImageRequireSource} from 'react-native'
|
||||
|
||||
export const DEF_AVATAR: ImageRequireSource = require('../../assets/default-avatar.png')
|
||||
export const CLOUD_SPLASH: ImageRequireSource = require('../../assets/splash.png')
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import {ImageRequireSource} from 'react-native'
|
||||
import {type ImageRequireSource} from 'react-native'
|
||||
|
||||
// @ts-ignore we need to pretend -prf
|
||||
export const DEF_AVATAR: ImageRequireSource = {uri: '/img/default-avatar.png'}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
export function GestureActionView({children}: {children: React.ReactNode}) {
|
||||
return children
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
import {Pressable, PressableProps, StyleProp, ViewStyle} from 'react-native'
|
||||
import {
|
||||
Pressable,
|
||||
type PressableProps,
|
||||
type StyleProp,
|
||||
type ViewStyle,
|
||||
} from 'react-native'
|
||||
import Animated, {
|
||||
cancelAnimation,
|
||||
useAnimatedStyle,
|
||||
|
||||
@@ -4,11 +4,11 @@ import {useLingui} from '@lingui/react'
|
||||
|
||||
import {logger} from '#/logger'
|
||||
import {isWeb} from '#/platform/detection'
|
||||
import {SessionAccount, useSessionApi} from '#/state/session'
|
||||
import {type SessionAccount, useSessionApi} from '#/state/session'
|
||||
import {useLoggedOutViewControls} from '#/state/shell/logged-out'
|
||||
import * as Toast from '#/view/com/util/Toast'
|
||||
import {logEvent} from '../statsig/statsig'
|
||||
import {LogEvents} from '../statsig/statsig'
|
||||
import {type LogEvents} from '../statsig/statsig'
|
||||
|
||||
export function useAccountSwitcher() {
|
||||
const [pendingDid, setPendingDid] = useState<string | null>(null)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {StackActions, useNavigation} from '@react-navigation/native'
|
||||
|
||||
import {NavigationProp} from '#/lib/routes/types'
|
||||
import {type NavigationProp} from '#/lib/routes/types'
|
||||
import {router} from '#/routes'
|
||||
|
||||
export function useGoBack(onGoBack?: () => unknown) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {useEffect} from 'react'
|
||||
import {useNavigation} from '@react-navigation/native'
|
||||
|
||||
import {NavigationProp} from '#/lib/routes/types'
|
||||
import {type NavigationProp} from '#/lib/routes/types'
|
||||
import {bskyTitle} from '#/lib/strings/headings'
|
||||
import {useUnreadNotifications} from '#/state/queries/notifications/unread'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {useCallback} from 'react'
|
||||
import {I18n} from '@lingui/core'
|
||||
import {type I18n} from '@lingui/core'
|
||||
import {defineMessage, msg, plural} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {differenceInSeconds} from 'date-fns'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {useEffect, useMemo, useState} from 'react'
|
||||
import {EventArg, useNavigation} from '@react-navigation/core'
|
||||
import {type EventArg, useNavigation} from '@react-navigation/core'
|
||||
|
||||
if ('scrollRestoration' in history) {
|
||||
// Tell the brower not to mess with the scroll.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {ImagePickerAsset} from 'expo-image-picker'
|
||||
import {type ImagePickerAsset} from 'expo-image-picker'
|
||||
|
||||
import {VIDEO_MAX_SIZE} from '#/lib/constants'
|
||||
import {VideoTooLargeError} from '#/lib/media/video/errors'
|
||||
import {CompressedVideo} from './types'
|
||||
import {type CompressedVideo} from './types'
|
||||
|
||||
// doesn't actually compress, converts to ArrayBuffer
|
||||
export async function compressVideo(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {BskyAgent} from '@atproto/api'
|
||||
import {I18n} from '@lingui/core'
|
||||
import {type BskyAgent} from '@atproto/api'
|
||||
import {type I18n} from '@lingui/core'
|
||||
import {msg} from '@lingui/macro'
|
||||
|
||||
import {VIDEO_SERVICE_DID} from '#/lib/constants'
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {createUploadTask, FileSystemUploadType} from 'expo-file-system'
|
||||
import {AppBskyVideoDefs, BskyAgent} from '@atproto/api'
|
||||
import {I18n} from '@lingui/core'
|
||||
import {type AppBskyVideoDefs, type BskyAgent} from '@atproto/api'
|
||||
import {type I18n} from '@lingui/core'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {nanoid} from 'nanoid/non-secure'
|
||||
|
||||
import {AbortError} from '#/lib/async/cancelable'
|
||||
import {ServerError} from '#/lib/media/video/errors'
|
||||
import {CompressedVideo} from '#/lib/media/video/types'
|
||||
import {type CompressedVideo} from '#/lib/media/video/types'
|
||||
import {getServiceAuthToken, getVideoUploadLimits} from './upload.shared'
|
||||
import {createVideoEndpointUrl, mimeToExt} from './util'
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import {AppBskyVideoDefs} from '@atproto/api'
|
||||
import {BskyAgent} from '@atproto/api'
|
||||
import {I18n} from '@lingui/core'
|
||||
import {type AppBskyVideoDefs} from '@atproto/api'
|
||||
import {type BskyAgent} from '@atproto/api'
|
||||
import {type I18n} from '@lingui/core'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {nanoid} from 'nanoid/non-secure'
|
||||
|
||||
import {AbortError} from '#/lib/async/cancelable'
|
||||
import {ServerError} from '#/lib/media/video/errors'
|
||||
import {CompressedVideo} from '#/lib/media/video/types'
|
||||
import {type CompressedVideo} from '#/lib/media/video/types'
|
||||
import {getServiceAuthToken, getVideoUploadLimits} from './upload.shared'
|
||||
import {createVideoEndpointUrl, mimeToExt} from './util'
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {AtpAgent} from '@atproto/api'
|
||||
|
||||
import {SupportedMimeTypes, VIDEO_SERVICE} from '#/lib/constants'
|
||||
import {type SupportedMimeTypes, VIDEO_SERVICE} from '#/lib/constants'
|
||||
|
||||
export const createVideoEndpointUrl = (
|
||||
route: string,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as bsky from '#/types/bsky'
|
||||
import type * as bsky from '#/types/bsky'
|
||||
|
||||
export function isBlockedOrBlocking(profile: bsky.profile.AnyProfileView) {
|
||||
return profile.viewer?.blockedBy || profile.viewer?.blocking
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import {InterpretedLabelValueDefinition, LabelPreference} from '@atproto/api'
|
||||
import {
|
||||
type InterpretedLabelValueDefinition,
|
||||
type LabelPreference,
|
||||
} from '@atproto/api'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
AppBskyLabelerDefs,
|
||||
ComAtprotoLabelDefs,
|
||||
InterpretedLabelValueDefinition,
|
||||
type AppBskyLabelerDefs,
|
||||
type ComAtprotoLabelDefs,
|
||||
type InterpretedLabelValueDefinition,
|
||||
interpretLabelValueDefinition,
|
||||
LABELS,
|
||||
} from '@atproto/api'
|
||||
@@ -9,7 +9,7 @@ import {useLingui} from '@lingui/react'
|
||||
import * as bcp47Match from 'bcp-47-match'
|
||||
|
||||
import {
|
||||
GlobalLabelStrings,
|
||||
type GlobalLabelStrings,
|
||||
useGlobalLabelStrings,
|
||||
} from '#/lib/moderation/useGlobalLabelStrings'
|
||||
import {useLabelDefinitions} from '#/state/preferences'
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import React, {useRef, useState} from 'react'
|
||||
import {AppState, AppStateStatus} from 'react-native'
|
||||
import {useRef, useState} from 'react'
|
||||
import {AppState, type AppStateStatus} from 'react-native'
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage'
|
||||
import {createAsyncStoragePersister} from '@tanstack/query-async-storage-persister'
|
||||
import {focusManager, onlineManager, QueryClient} from '@tanstack/react-query'
|
||||
import {
|
||||
PersistQueryClientProvider,
|
||||
PersistQueryClientProviderProps,
|
||||
type PersistQueryClientProviderProps,
|
||||
} from '@tanstack/react-query-persist-client'
|
||||
import type React from 'react'
|
||||
|
||||
import {isNative} from '#/platform/detection'
|
||||
import {listenNetworkConfirmed, listenNetworkLost} from '#/state/events'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {NavigationProp} from '@react-navigation/native'
|
||||
import {type NavigationProp} from '@react-navigation/native'
|
||||
|
||||
import {RouteParams, State} from './types'
|
||||
import {type RouteParams, type State} from './types'
|
||||
|
||||
export function getRootNavigation<T extends {}>(
|
||||
nav: NavigationProp<T>,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {ModerationUI} from '@atproto/api'
|
||||
import {type ModerationUI} from '@atproto/api'
|
||||
|
||||
// \u2705 = ✅
|
||||
// \u2713 = ✓
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {AppBskyRichtextFacet, RichText} from '@atproto/api'
|
||||
import {AppBskyRichtextFacet, type RichText} from '@atproto/api'
|
||||
|
||||
import {linkRequiresWarning} from './url-helpers'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {AppBskyRichtextFacet, RichText, UnicodeString} from '@atproto/api'
|
||||
import {AppBskyRichtextFacet, type RichText, UnicodeString} from '@atproto/api'
|
||||
|
||||
import {toShortUrl} from './url-helpers'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {I18n} from '@lingui/core'
|
||||
import {type I18n} from '@lingui/core'
|
||||
|
||||
export function niceDate(i18n: I18n, date: number | string | Date) {
|
||||
const d = new Date(date)
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import {tokens} from '#/alf'
|
||||
import {darkPalette, dimPalette, lightPalette} from '#/alf/themes'
|
||||
import {fontWeight} from '#/alf/tokens'
|
||||
import {colors} from './styles'
|
||||
import type {Theme} from './ThemeContext'
|
||||
import {type Theme} from './ThemeContext'
|
||||
|
||||
export const defaultTheme: Theme = {
|
||||
colorScheme: 'light',
|
||||
|
||||
Reference in New Issue
Block a user