run yarn lint --fix (#9013)
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
ConvoState,
|
||||
ConvoStateBackgrounded,
|
||||
ConvoStateDisabled,
|
||||
ConvoStateReady,
|
||||
ConvoStateSuspended,
|
||||
type ConvoState,
|
||||
type ConvoStateBackgrounded,
|
||||
type ConvoStateDisabled,
|
||||
type ConvoStateReady,
|
||||
type ConvoStateSuspended,
|
||||
ConvoStatus,
|
||||
} from './types'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {BskyAgent, ChatBskyConvoGetLog} from '@atproto/api'
|
||||
import {type BskyAgent, type ChatBskyConvoGetLog} from '@atproto/api'
|
||||
|
||||
export type MessagesEventBusParams = {
|
||||
agent: BskyAgent
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
import {CurrentConvoIdProvider} from '#/state/messages/current-convo-id'
|
||||
import {MessagesEventBusProvider} from '#/state/messages/events'
|
||||
|
||||
@@ -4,11 +4,11 @@ import BroadcastChannel from '#/lib/broadcast'
|
||||
import {logger} from '#/logger'
|
||||
import {
|
||||
defaults,
|
||||
Schema,
|
||||
type Schema,
|
||||
tryParse,
|
||||
tryStringify,
|
||||
} from '#/state/persisted/schema'
|
||||
import {PersistedApi} from './types'
|
||||
import {type PersistedApi} from './types'
|
||||
import {normalizeData} from './util'
|
||||
|
||||
export type {PersistedAccount, Schema} from '#/state/persisted/schema'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type {Schema} from './schema'
|
||||
import {type Schema} from './schema'
|
||||
|
||||
export type PersistedApi = {
|
||||
init(): Promise<void>
|
||||
|
||||
@@ -2,7 +2,7 @@ import {parse} from 'bcp-47'
|
||||
|
||||
import {dedupArray} from '#/lib/functions'
|
||||
import {logger} from '#/logger'
|
||||
import {Schema} from '#/state/persisted/schema'
|
||||
import {type Schema} from '#/state/persisted/schema'
|
||||
|
||||
export function normalizeData(data: Schema) {
|
||||
const next = {...data}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import type React from 'react'
|
||||
|
||||
import {Provider as AltTextRequiredProvider} from './alt-text-required'
|
||||
import {Provider as AutoplayProvider} from './autoplay'
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import React from 'react'
|
||||
import {AppBskyActorDefs, moderateProfile, ModerationOpts} from '@atproto/api'
|
||||
import {
|
||||
type AppBskyActorDefs,
|
||||
moderateProfile,
|
||||
type ModerationOpts,
|
||||
} from '@atproto/api'
|
||||
import {keepPreviousData, useQuery, useQueryClient} from '@tanstack/react-query'
|
||||
|
||||
import {isJustAMute, moduiContainsHideableOffense} from '#/lib/moderation'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {ComAtprotoServerCreateAppPassword} from '@atproto/api'
|
||||
import {type ComAtprotoServerCreateAppPassword} from '@atproto/api'
|
||||
import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query'
|
||||
|
||||
import {STALE} from '#/state/queries'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {ComAtprotoServerDefs} from '@atproto/api'
|
||||
import {type ComAtprotoServerDefs} from '@atproto/api'
|
||||
import {useQuery} from '@tanstack/react-query'
|
||||
|
||||
import {cleanError} from '#/lib/strings/errors'
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import {AppBskyActorDefs, AppBskyGraphGetKnownFollowers} from '@atproto/api'
|
||||
import {
|
||||
InfiniteData,
|
||||
QueryClient,
|
||||
QueryKey,
|
||||
type AppBskyActorDefs,
|
||||
type AppBskyGraphGetKnownFollowers,
|
||||
} from '@atproto/api'
|
||||
import {
|
||||
type InfiniteData,
|
||||
type QueryClient,
|
||||
type QueryKey,
|
||||
useInfiniteQuery,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {AppBskyActorDefs, AppBskyGraphGetBlocks} from '@atproto/api'
|
||||
import {type AppBskyActorDefs, type AppBskyGraphGetBlocks} from '@atproto/api'
|
||||
import {
|
||||
InfiniteData,
|
||||
QueryClient,
|
||||
QueryKey,
|
||||
type InfiniteData,
|
||||
type QueryClient,
|
||||
type QueryKey,
|
||||
useInfiniteQuery,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {AppBskyGraphDefs} from '@atproto/api'
|
||||
import {QueryClient, useQuery} from '@tanstack/react-query'
|
||||
import {type AppBskyGraphDefs} from '@atproto/api'
|
||||
import {type QueryClient, useQuery} from '@tanstack/react-query'
|
||||
|
||||
import {accumulate} from '#/lib/async/accumulate'
|
||||
import {STALE} from '#/state/queries'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {AppBskyActorDefs, AppBskyGraphGetMutes} from '@atproto/api'
|
||||
import {type AppBskyActorDefs, type AppBskyGraphGetMutes} from '@atproto/api'
|
||||
import {
|
||||
InfiniteData,
|
||||
QueryClient,
|
||||
QueryKey,
|
||||
type InfiniteData,
|
||||
type QueryClient,
|
||||
type QueryKey,
|
||||
useInfiniteQuery,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {AppBskyActorDefs} from '@atproto/api'
|
||||
import {type AppBskyActorDefs} from '@atproto/api'
|
||||
|
||||
export type Data = Record<string, unknown> | undefined
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {AppBskyActorDefs, nuxSchema} from '@atproto/api'
|
||||
import {type AppBskyActorDefs, nuxSchema} from '@atproto/api'
|
||||
|
||||
import {
|
||||
AppNux,
|
||||
Nux,
|
||||
type AppNux,
|
||||
type Nux,
|
||||
nuxNames,
|
||||
NuxSchemas,
|
||||
} from '#/state/queries/nuxs/definitions'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {AppBskyActorDefs} from '@atproto/api'
|
||||
import {type AppBskyActorDefs} from '@atproto/api'
|
||||
import {useMutation, useQueryClient} from '@tanstack/react-query'
|
||||
|
||||
import {preferencesQueryKey} from '#/state/queries/preferences'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {AppBskyActorDefs, AppBskyFeedGetLikes} from '@atproto/api'
|
||||
import {type AppBskyActorDefs, type AppBskyFeedGetLikes} from '@atproto/api'
|
||||
import {
|
||||
InfiniteData,
|
||||
QueryClient,
|
||||
QueryKey,
|
||||
type InfiniteData,
|
||||
type QueryClient,
|
||||
type QueryKey,
|
||||
useInfiniteQuery,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
import {
|
||||
AppBskyActorDefs,
|
||||
type AppBskyActorDefs,
|
||||
AppBskyEmbedRecord,
|
||||
AppBskyFeedDefs,
|
||||
AppBskyFeedGetQuotes,
|
||||
type AppBskyFeedDefs,
|
||||
type AppBskyFeedGetQuotes,
|
||||
AtUri,
|
||||
} from '@atproto/api'
|
||||
import {
|
||||
InfiniteData,
|
||||
QueryClient,
|
||||
QueryKey,
|
||||
type InfiniteData,
|
||||
type QueryClient,
|
||||
type QueryKey,
|
||||
useInfiniteQuery,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import {AppBskyActorDefs, AppBskyFeedGetRepostedBy} from '@atproto/api'
|
||||
import {
|
||||
InfiniteData,
|
||||
QueryClient,
|
||||
QueryKey,
|
||||
type AppBskyActorDefs,
|
||||
type AppBskyFeedGetRepostedBy,
|
||||
} from '@atproto/api'
|
||||
import {
|
||||
type InfiniteData,
|
||||
type QueryClient,
|
||||
type QueryKey,
|
||||
useInfiniteQuery,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
BskyFeedViewPreference,
|
||||
BskyPreferences,
|
||||
BskyThreadViewPreference,
|
||||
type BskyFeedViewPreference,
|
||||
type BskyPreferences,
|
||||
type BskyThreadViewPreference,
|
||||
} from '@atproto/api'
|
||||
|
||||
export type UsePreferencesQueryResponse = Omit<
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
import {AppBskyFeedGetActorFeeds, moderateFeedGenerator} from '@atproto/api'
|
||||
import {InfiniteData, QueryKey, useInfiniteQuery} from '@tanstack/react-query'
|
||||
import {
|
||||
type AppBskyFeedGetActorFeeds,
|
||||
moderateFeedGenerator,
|
||||
} from '@atproto/api'
|
||||
import {
|
||||
type InfiniteData,
|
||||
type QueryKey,
|
||||
useInfiniteQuery,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
import {useAgent} from '#/state/session'
|
||||
import {useModerationOpts} from '../preferences/moderation-opts'
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
import {AppBskyActorDefs, AppBskyGraphGetFollowers} from '@atproto/api'
|
||||
import {
|
||||
InfiniteData,
|
||||
QueryClient,
|
||||
QueryKey,
|
||||
type AppBskyActorDefs,
|
||||
type AppBskyGraphGetFollowers,
|
||||
} from '@atproto/api'
|
||||
import {
|
||||
type InfiniteData,
|
||||
type QueryClient,
|
||||
type QueryKey,
|
||||
useInfiniteQuery,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {AppBskyActorDefs, AppBskyGraphGetFollows} from '@atproto/api'
|
||||
import {type AppBskyActorDefs, type AppBskyGraphGetFollows} from '@atproto/api'
|
||||
import {
|
||||
InfiniteData,
|
||||
QueryClient,
|
||||
QueryKey,
|
||||
type InfiniteData,
|
||||
type QueryClient,
|
||||
type QueryKey,
|
||||
useInfiniteQuery,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import {AppBskyGraphGetLists, moderateUserList} from '@atproto/api'
|
||||
import {InfiniteData, QueryKey, useInfiniteQuery} from '@tanstack/react-query'
|
||||
import {type AppBskyGraphGetLists, moderateUserList} from '@atproto/api'
|
||||
import {
|
||||
type InfiniteData,
|
||||
type QueryKey,
|
||||
useInfiniteQuery,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
import {useAgent} from '#/state/session'
|
||||
import {useModerationOpts} from '../preferences/moderation-opts'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {QueryClient, useQuery} from '@tanstack/react-query'
|
||||
import {type QueryClient, useQuery} from '@tanstack/react-query'
|
||||
|
||||
import {STALE} from '#/state/queries/index'
|
||||
import {useAgent} from '../session'
|
||||
@@ -9,10 +9,10 @@ export const RQKEY_LINK = (url: string) => [RQKEY_LINK_ROOT, url]
|
||||
const RQKEY_GIF_ROOT = 'resolve-gif'
|
||||
export const RQKEY_GIF = (url: string) => [RQKEY_GIF_ROOT, url]
|
||||
|
||||
import {BskyAgent} from '@atproto/api'
|
||||
import {type BskyAgent} from '@atproto/api'
|
||||
|
||||
import {ResolvedLink, resolveGif, resolveLink} from '#/lib/api/resolve'
|
||||
import {Gif} from './tenor'
|
||||
import {type ResolvedLink, resolveGif, resolveLink} from '#/lib/api/resolve'
|
||||
import {type Gif} from './tenor'
|
||||
|
||||
export function useResolveLinkQuery(url: string) {
|
||||
const agent = useAgent()
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import {AtUri} from '@atproto/api'
|
||||
import {QueryClient, useQuery, UseQueryResult} from '@tanstack/react-query'
|
||||
import {
|
||||
type QueryClient,
|
||||
useQuery,
|
||||
type UseQueryResult,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
import {STALE} from '#/state/queries'
|
||||
import {useAgent} from '#/state/session'
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import React from 'react'
|
||||
import {
|
||||
AppBskyActorDefs,
|
||||
AppBskyFeedDefs,
|
||||
AppBskyFeedSearchPosts,
|
||||
type AppBskyActorDefs,
|
||||
type AppBskyFeedDefs,
|
||||
type AppBskyFeedSearchPosts,
|
||||
AtUri,
|
||||
moderatePost,
|
||||
} from '@atproto/api'
|
||||
import {
|
||||
InfiniteData,
|
||||
QueryClient,
|
||||
QueryKey,
|
||||
type InfiniteData,
|
||||
type QueryClient,
|
||||
type QueryKey,
|
||||
useInfiniteQuery,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
import {AppBskyFeedGetSuggestedFeeds} from '@atproto/api'
|
||||
import {InfiniteData, QueryKey, useInfiniteQuery} from '@tanstack/react-query'
|
||||
import {type AppBskyFeedGetSuggestedFeeds} from '@atproto/api'
|
||||
import {
|
||||
type InfiniteData,
|
||||
type QueryKey,
|
||||
useInfiniteQuery,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
import {STALE} from '#/state/queries'
|
||||
import {useAgent} from '#/state/session'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
AppBskyFeedDefs,
|
||||
AppBskyFeedGetPostThread,
|
||||
type AppBskyFeedGetPostThread,
|
||||
AppBskyFeedThreadgate,
|
||||
AtUri,
|
||||
BskyAgent,
|
||||
type BskyAgent,
|
||||
} from '@atproto/api'
|
||||
import {useMutation, useQuery, useQueryClient} from '@tanstack/react-query'
|
||||
|
||||
@@ -11,7 +11,7 @@ import {networkRetry, retry} from '#/lib/async/retry'
|
||||
import {until} from '#/lib/async/until'
|
||||
import {STALE} from '#/state/queries'
|
||||
import {RQKEY_ROOT as postThreadQueryKeyRoot} from '#/state/queries/post-thread'
|
||||
import {ThreadgateAllowUISetting} from '#/state/queries/threadgate/types'
|
||||
import {type ThreadgateAllowUISetting} from '#/state/queries/threadgate/types'
|
||||
import {
|
||||
createThreadgateRecord,
|
||||
mergeThreadgateRecords,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {AppBskyFeedDefs, AppBskyFeedThreadgate} from '@atproto/api'
|
||||
import {type AppBskyFeedDefs, AppBskyFeedThreadgate} from '@atproto/api'
|
||||
|
||||
import {ThreadgateAllowUISetting} from '#/state/queries/threadgate/types'
|
||||
import {type ThreadgateAllowUISetting} from '#/state/queries/threadgate/types'
|
||||
import * as bsky from '#/types/bsky'
|
||||
|
||||
export function threadgateViewToAllowUISetting(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {useCallback} from 'react'
|
||||
import {QueryClient, useQueryClient} from '@tanstack/react-query'
|
||||
import {type QueryClient, useQueryClient} from '@tanstack/react-query'
|
||||
|
||||
import * as bsky from '#/types/bsky'
|
||||
import type * as bsky from '#/types/bsky'
|
||||
|
||||
const unstableProfileViewCacheQueryKeyRoot = 'unstableProfileViewCache'
|
||||
export const unstableProfileViewCacheQueryKey = (didOrHandle: string) => [
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
import {
|
||||
AppBskyActorDefs,
|
||||
type AppBskyActorDefs,
|
||||
AppBskyEmbedRecord,
|
||||
AppBskyEmbedRecordWithMedia,
|
||||
AppBskyFeedDefs,
|
||||
type AppBskyFeedDefs,
|
||||
AppBskyFeedPost,
|
||||
AtUri,
|
||||
type AtUri,
|
||||
} from '@atproto/api'
|
||||
import {InfiniteData, QueryClient, QueryKey} from '@tanstack/react-query'
|
||||
import {
|
||||
type InfiniteData,
|
||||
type QueryClient,
|
||||
type QueryKey,
|
||||
} from '@tanstack/react-query'
|
||||
|
||||
import * as bsky from '#/types/bsky'
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import {BskyAgent} from '@atproto/api'
|
||||
import {describe, expect, it, jest} from '@jest/globals'
|
||||
|
||||
import {agentToSessionAccountOrThrow} from '../agent'
|
||||
import {Action, getInitialState, reducer, State} from '../reducer'
|
||||
import {type Action, getInitialState, reducer, type State} from '../reducer'
|
||||
|
||||
jest.mock('jwt-decode', () => ({
|
||||
jwtDecode(_token: string) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import {BSKY_LABELER_DID, BskyAgent} from '@atproto/api'
|
||||
import {IS_TEST_USER} from '#/lib/constants'
|
||||
import {configureAdditionalModerationAuthorities} from './additional-moderation-authorities'
|
||||
import {readLabelers} from './agent-config'
|
||||
import {SessionAccount} from './types'
|
||||
import {type SessionAccount} from './types'
|
||||
|
||||
export function configureModerationForGuest() {
|
||||
// This global mutation is *only* OK because this code is only relevant for testing.
|
||||
|
||||
@@ -3,7 +3,7 @@ import {jwtDecode} from 'jwt-decode'
|
||||
import {hasProp} from '#/lib/type-guards'
|
||||
import {logger} from '#/logger'
|
||||
import * as persisted from '#/state/persisted'
|
||||
import {SessionAccount} from './types'
|
||||
import {type SessionAccount} from './types'
|
||||
|
||||
export function readLastActiveAccount() {
|
||||
const {currentAccount, accounts} = persisted.get('session')
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {simpleAreDatesEqual} from '#/lib/strings/time'
|
||||
import {logger} from '#/logger'
|
||||
import * as persisted from '#/state/persisted'
|
||||
import {SessionAccount} from '../session'
|
||||
import {type SessionAccount} from '../session'
|
||||
import {isOnboardingActive} from './onboarding'
|
||||
|
||||
export function shouldRequestEmailConfirmation(account: SessionAccount) {
|
||||
|
||||
Reference in New Issue
Block a user