fix a bunch of lint errors #21

merged
opened by daniela.lol targeting main

lint errors make me and vs code sad : ( (and these shouldve stopped u from committing code from linting failing, im surprised these even made it in)

"Run autofix to sort these imports!" - the yummy massive red square on my vs code screen

this doesnt fix any lint warnings but thats cuz they mostly dont matter n a lot of them are from upstream #lol

Changed files
+8 -12
src
components
PostControls
lib
api
state
view
com
+1 -1
src/components/PostControls/PostMenu/PostMenuItems.tsx
···
AppBskyFeedPost,
type AppBskyFeedThreadgate,
AtUri,
-
type RichText as RichTextAPI,
type BlobRef,
+
type RichText as RichTextAPI,
} from '@atproto/api'
import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
+1 -1
src/lib/api/index.ts
···
import * as Hasher from 'multiformats/hashes/hasher'
import {isNetworkError} from '#/lib/strings/errors'
-
import {shortenLinks, stripInvalidMentions, parseMarkdownLinks} from '#/lib/strings/rich-text-manip'
+
import {parseMarkdownLinks,shortenLinks, stripInvalidMentions} from '#/lib/strings/rich-text-manip'
import {logger} from '#/logger'
import {compressImage} from '#/state/gallery'
import {
+1 -1
src/state/gallery.ts
···
-
import {type BlobRef} from '@atproto/api'
import {
cacheDirectory,
deleteAsync,
···
manipulateAsync,
SaveFormat,
} from 'expo-image-manipulator'
+
import {type BlobRef} from '@atproto/api'
import {nanoid} from 'nanoid/non-secure'
import {POST_IMG_MAX} from '#/lib/constants'
+1 -3
src/view/com/composer/Composer.tsx
···
import {TextInput} from '#/view/com/composer/text-input/TextInput'
import {ThreadgateBtn} from '#/view/com/composer/threadgate/ThreadgateBtn'
import {SubtitleDialogBtn} from '#/view/com/composer/videos/SubtitleDialog'
+
import {VideoEmbedRedraft} from '#/view/com/composer/videos/VideoEmbedRedraft'
import {VideoPreview} from '#/view/com/composer/videos/VideoPreview'
import {VideoTranscodeProgress} from '#/view/com/composer/videos/VideoTranscodeProgress'
-
import {VideoEmbedRedraft} from '#/view/com/composer/videos/VideoEmbedRedraft'
import {Text} from '#/view/com/util/text/Text'
import {UserAvatar} from '#/view/com/util/UserAvatar'
import {atoms as a, native, useTheme, web} from '#/alf'
···
import {CircleInfo_Stroke2_Corner0_Rounded as CircleInfoIcon} from '#/components/icons/CircleInfo'
import {EmojiArc_Stroke2_Corner0_Rounded as EmojiSmileIcon} from '#/components/icons/Emoji'
import {PlusLarge_Stroke2_Corner0_Rounded as PlusIcon} from '#/components/icons/Plus'
-
import {Play_Stroke2_Corner0_Rounded as PlayIcon} from '#/components/icons/Play'
import {TimesLarge_Stroke2_Corner0_Rounded as XIcon} from '#/components/icons/Times'
import {LazyQuoteEmbed} from '#/components/Post/Embed/LazyQuoteEmbed'
import * as Prompt from '#/components/Prompt'
···
canRemoveQuote: boolean
isActivePost: boolean
}) {
-
const theme = useTheme()
const video = embed.media?.type === 'video' ? embed.media.video : null
return (
<>
+1 -2
src/view/com/composer/state/composer.ts
···
suggestLinkCardUri,
} from '#/view/com/composer/text-input/text-input-util'
import {
-
createVideoState,
createRedraftVideoState,
-
type RedraftState,
+
createVideoState,
type VideoAction,
videoReducer,
type VideoState,
+1 -2
src/view/com/composer/videos/VideoEmbedRedraft.tsx
···
-
import React from 'react'
import {Platform, View} from 'react-native'
import {type BlobRef} from '@atproto/api'
import {BlueskyVideoView} from '@haileyok/bluesky-video'
import {atoms as a} from '#/alf'
-
import {ExternalEmbedRemoveBtn} from '../ExternalEmbedRemoveBtn'
import {VideoEmbedInnerWeb} from '#/components/Post/Embed/VideoEmbed/VideoEmbedInner/VideoEmbedInnerWeb'
+
import {ExternalEmbedRemoveBtn} from '../ExternalEmbedRemoveBtn'
interface Props {
blobRef: BlobRef
+2 -2
src/view/com/notifications/NotificationFeed.tsx
···
} from 'react-native'
import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
-
import {useTheme} from '#/alf'
import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender'
import {cleanError} from '#/lib/strings/errors'
···
import {List, type ListProps, type ListRef} from '#/view/com/util/List'
import {NotificationFeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
import {LoadMoreRetryBtn} from '#/view/com/util/LoadMoreRetryBtn'
+
import {useTheme} from '#/alf'
import {Bell_Stroke2_Corner0_Rounded as BellIcon} from '#/components/icons/Bell'
import {NotificationFeedItem} from './NotificationFeedItem'
···
) : (
<View />
),
-
[isFetchingNextPage],
+
[isFetchingNextPage, t.palette.primary_500],
)
return (