diff --git a/src/Navigation.tsx b/src/Navigation.tsx index ec3072f46d..daa76629d1 100644 --- a/src/Navigation.tsx +++ b/src/Navigation.tsx @@ -1006,7 +1006,7 @@ function RoutesContainer({children}: React.PropsWithChildren<{}>) { ax.metric('init', { initMs: Math.round( - // @ts-ignore Emitted by Metro in the bundle prelude + // @ts-expect-error Emitted by Metro in the bundle prelude performance.now() - global.__BUNDLE_START_TIME__, ), }) @@ -1081,7 +1081,7 @@ function navigate( } navigationRef.addListener('state', handler) - // @ts-ignore I don't know what would make typescript happy but I have a life -prf + // @ts-expect-error I don't know what would make typescript happy but I have a life -prf navigationRef.navigate(name, params) }), timeout(1e3), diff --git a/src/Splash.tsx b/src/Splash.tsx index 4cc50b4ebb..76c9c7de82 100644 --- a/src/Splash.tsx +++ b/src/Splash.tsx @@ -20,9 +20,9 @@ import * as SplashScreen from 'expo-splash-screen' import {Logotype} from '#/view/icons/Logotype' import {atoms as a} from '#/alf' -// @ts-ignore +// @ts-expect-error import splashImagePointer from '../assets/splash/splash.png' -// @ts-ignore +// @ts-expect-error import darkSplashImagePointer from '../assets/splash/splash-dark.png' const splashImageUri = RNImage.resolveAssetSource(splashImagePointer)!.uri @@ -36,7 +36,7 @@ export const Logo = forwardRef(function LogoImpl(props: SvgProps, ref) { return ( diff --git a/src/ageAssurance/components/RedirectOverlay.tsx b/src/ageAssurance/components/RedirectOverlay.tsx index 5b31e94365..18f176d248 100644 --- a/src/ageAssurance/components/RedirectOverlay.tsx +++ b/src/ageAssurance/components/RedirectOverlay.tsx @@ -149,7 +149,6 @@ export function RedirectOverlay() { t.atoms.bg, gtMobile ? a.p_2xl : a.p_xl, a.align_center, - // @ts-ignore platform({ web: { paddingTop: '35vh', diff --git a/src/alf/util/useColorModeTheme.ts b/src/alf/util/useColorModeTheme.ts index 5dae61c630..dfcc57b53a 100644 --- a/src/alf/util/useColorModeTheme.ts +++ b/src/alf/util/useColorModeTheme.ts @@ -39,11 +39,8 @@ function getThemeName( } function updateDocument(theme: ThemeName) { - // @ts-ignore web only if (IS_WEB && typeof window !== 'undefined') { - // @ts-ignore web only const html = window.document.documentElement - // @ts-ignore web only const meta = window.document.querySelector('meta[name="theme-color"]') // remove any other color mode classes diff --git a/src/analytics/utils.ts b/src/analytics/utils.ts index 95d2efb589..b20b3719c9 100644 --- a/src/analytics/utils.ts +++ b/src/analytics/utils.ts @@ -14,7 +14,7 @@ import { export function useMeta(metadata?: MergeableMetadata) { const m = useMemo(() => metadata, [metadata]) if (!m) return - // @ts-ignore + // @ts-expect-error m.__meta = true return m } diff --git a/src/components/Button.tsx b/src/components/Button.tsx index eee55647e0..2c1f7ff3f8 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -577,7 +577,6 @@ export const Button = forwardRef, ButtonProps>( role="button" accessibilityHint={undefined} // optional {...rest} - // @ts-ignore - this will always be a pressable ref={ref} aria-label={label} aria-pressed={state.pressed} diff --git a/src/components/Composer/index.tsx b/src/components/Composer/index.tsx index 0f16496fc6..b2266db5a1 100644 --- a/src/components/Composer/index.tsx +++ b/src/components/Composer/index.tsx @@ -314,7 +314,7 @@ export function Composer({ style={[a.absolute, a.inset_0, a.z_10, {overflow: 'hidden'}]} ref={node => { if (IS_WEB && node) { - // @ts-ignore web only a11y + // @ts-expect-error web only a11y node.setAttribute('inert', '') } }}> @@ -367,11 +367,10 @@ export function Composer({ inputScrollSharedValue.value = e.nativeEvent.contentOffset.y } }} - // @ts-ignore web only + // @ts-expect-error web only onCompositionStart={() => { isComposing.current = true }} - // @ts-ignore web only onCompositionEnd={() => { isComposing.current = false }} diff --git a/src/components/ContextMenu/index.tsx b/src/components/ContextMenu/index.tsx index 95492a385a..b018c8eb3f 100644 --- a/src/components/ContextMenu/index.tsx +++ b/src/components/ContextMenu/index.tsx @@ -712,7 +712,7 @@ export function Outer({ t.atoms.bg_contrast_25, a.w_full, // @ts-ignore react-native-web expects string, and this file is platform-split -sfn - // note: above @ts-ignore cannot be a @ts-expect-error because this does not cause an error + // note: above @ts-expect-error cannot be a @ts-expect-error because this does not cause an error // in the typecheck CI - presumably because of RNW overriding the types { transformOrigin: diff --git a/src/components/FeedInterstitials.tsx b/src/components/FeedInterstitials.tsx index a868004195..59bbe85752 100644 --- a/src/components/FeedInterstitials.tsx +++ b/src/components/FeedInterstitials.tsx @@ -276,7 +276,7 @@ export function ProfileGrid({ }, {threshold: 0.5}, ) - // @ts-ignore - web only + // @ts-expect-error - web only observer.observe(node) return () => observer.disconnect() } else { diff --git a/src/components/Lightbox/Lightbox.web.tsx b/src/components/Lightbox/Lightbox.web.tsx index 0222aa3156..cccbe4f851 100644 --- a/src/components/Lightbox/Lightbox.web.tsx +++ b/src/components/Lightbox/Lightbox.web.tsx @@ -446,9 +446,7 @@ function LightboxGalleryItem({ const styles = StyleSheet.create({ avi: { - // @ts-ignore web-only maxWidth: `calc(min(400px, 100vw))`, - // @ts-ignore web-only maxHeight: `calc(min(400px, 100vh))`, padding: 16, boxSizing: 'border-box', @@ -458,7 +456,6 @@ const styles = StyleSheet.create({ // column via ScrollView's default flexGrow. flexGrow: 0, flexShrink: 0, - // @ts-ignore web-only -sfn maxHeight: '50vh', }, menuBtn: { diff --git a/src/components/Lightbox/pager/ImageItem/ImageItem.ios.tsx b/src/components/Lightbox/pager/ImageItem/ImageItem.ios.tsx index 6da83e7f7a..c4a842a74e 100644 --- a/src/components/Lightbox/pager/ImageItem/ImageItem.ios.tsx +++ b/src/components/Lightbox/pager/ImageItem/ImageItem.ios.tsx @@ -109,7 +109,6 @@ const ImageItem = ({ height: number }) { const scrollResponderRef = scrollViewRef?.current?.getScrollResponder() - // @ts-ignore scrollResponderRef?.scrollResponderZoomTo({ ...nextZoomRect, // This rect is in screen coordinates animated: true, @@ -218,7 +217,6 @@ const ImageItem = ({ return ( = Promise & {value: undefined | T} const promiseForHls = import( - // @ts-ignore + // @ts-expect-error 'hls.js/dist/hls.min' // oxlint-disable-next-line typescript/no-unsafe-member-access ).then(mod => mod.default) as CachedPromise diff --git a/src/components/ProfileHoverCard/index.web.tsx b/src/components/ProfileHoverCard/index.web.tsx index ccc48b8951..a5f47be28b 100644 --- a/src/components/ProfileHoverCard/index.web.tsx +++ b/src/components/ProfileHoverCard/index.web.tsx @@ -318,11 +318,10 @@ export function ProfileHoverCardInner(props: ProfileHoverCardProps) { return ( {props.children} diff --git a/src/components/RichText.tsx b/src/components/RichText.tsx index 00a0cd876d..1fa020f2a9 100644 --- a/src/components/RichText.tsx +++ b/src/components/RichText.tsx @@ -104,7 +104,6 @@ export function RichText({ style={[plainStyles, {fontSize}, suffixStyles]} onLayout={onLayout} onTextLayout={onTextLayout} - // @ts-ignore web only -prf dataSet={WORD_WRAP}> {text} {suffix ? ' ' : null} @@ -121,7 +120,6 @@ export function RichText({ numberOfLines={numberOfLines} onLayout={onLayout} onTextLayout={onTextLayout} - // @ts-ignore web only -prf dataSet={WORD_WRAP}> {text} {suffix ? ' ' : null} @@ -150,7 +148,7 @@ export function RichText({ selectable={selectable} to={`/profile/${mention.did}`} style={interactiveStyles} - // @ts-ignore TODO + // @ts-expect-error TODO dataSet={WORD_WRAP} shouldProxy={shouldProxyLinks} onPress={onLinkPress}> @@ -169,7 +167,7 @@ export function RichText({ key={key} to={link.uri} style={interactiveStyles} - // @ts-ignore TODO + // @ts-expect-error TODO dataSet={WORD_WRAP} shareOnLongPress shouldProxy={shouldProxyLinks} @@ -209,7 +207,6 @@ export function RichText({ numberOfLines={numberOfLines} onLayout={onLayout} onTextLayout={onTextLayout} - // @ts-ignore web only -prf dataSet={WORD_WRAP}> {els} {suffix ? ' ' : null} diff --git a/src/components/dialogs/nuxs/index.tsx b/src/components/dialogs/nuxs/index.tsx index bbd40feb52..e8b6789120 100644 --- a/src/components/dialogs/nuxs/index.tsx +++ b/src/components/dialogs/nuxs/index.tsx @@ -117,7 +117,7 @@ function Inner({ }, [activeNux, setActiveNux]) if (__DEV__ && typeof window !== 'undefined') { - // @ts-ignore + // @ts-expect-error window.clearNuxDialog = (id: Nux) => { if (!__DEV__ || !id) return resetNuxs([id]) diff --git a/src/components/dms/components/UserSearchInput.tsx b/src/components/dms/components/UserSearchInput.tsx index d9658c50f0..511fa58c03 100644 --- a/src/components/dms/components/UserSearchInput.tsx +++ b/src/components/dms/components/UserSearchInput.tsx @@ -38,7 +38,6 @@ export function UserSearchInput({ fill={interacted ? t.palette.primary_500 : t.palette.contrast_300} /> { if (env.IS_DEV && IS_WEB && typeof window !== 'undefined') { - // @ts-ignore + // @ts-expect-error window.__updateLiveEventPreferences = async ( action: LiveEventPreferencesAction, ) => { diff --git a/src/lib/api/feed/merge.ts b/src/lib/api/feed/merge.ts index 91d300afb8..085c0e1b70 100644 --- a/src/lib/api/feed/merge.ts +++ b/src/lib/api/feed/merge.ts @@ -334,7 +334,7 @@ class MergeFeedSource_Custom extends MergeFeedSource { feed = feed.filter(post => new Date(post.post.indexedAt) > this.minDate) // attach source info for (const post of feed) { - // @ts-ignore + // @ts-expect-error post.__source = this.sourceInfo } return { diff --git a/src/lib/jwt.ts b/src/lib/jwt.ts index 8ba2f091ba..9298d9ded7 100644 --- a/src/lib/jwt.ts +++ b/src/lib/jwt.ts @@ -24,6 +24,6 @@ export function isJwtExpired(token: string) { export function isAppPassword(token: string) { const payload = jwtDecode(token) - // @ts-ignore + // @ts-expect-error return payload.scope === 'com.atproto.appPass' } diff --git a/src/lib/strings/embed-player.ts b/src/lib/strings/embed-player.ts index f1014c4dcb..2bba205193 100644 --- a/src/lib/strings/embed-player.ts +++ b/src/lib/strings/embed-player.ts @@ -5,8 +5,7 @@ import {IS_WEB} from '#/env' const {height: SCREEN_HEIGHT} = Dimensions.get('window') const IFRAME_HOST = IS_WEB - ? // @ts-ignore only for web - window.location.host === 'localhost:8100' + ? window.location.host === 'localhost:8100' ? 'http://localhost:8100' : 'https://bsky.app' : __DEV__ && !process.env.JEST_WORKER_ID @@ -154,10 +153,7 @@ export function parseEmbedPlayerFromUrl( urlp.hostname === 'www.twitch.tv' || urlp.hostname === 'm.twitch.tv' ) { - const parent = IS_WEB - ? // @ts-ignore only for web - window.location.hostname - : 'localhost' + const parent = IS_WEB ? window.location.hostname : 'localhost' const [__, channelOrVideo, clipOrId, id] = urlp.pathname.split('/') diff --git a/src/locale/deviceLocales.ts b/src/locale/deviceLocales.ts index 103fa5d67f..bcf7184c2d 100644 --- a/src/locale/deviceLocales.ts +++ b/src/locale/deviceLocales.ts @@ -57,7 +57,7 @@ export function getLocales() { } } - // @ts-ignore checked above + // @ts-expect-error checked above output.push(locale) } diff --git a/src/logger/__tests__/logger.test.ts b/src/logger/__tests__/logger.test.ts index ed46301f6e..e82f644a53 100644 --- a/src/logger/__tests__/logger.test.ts +++ b/src/logger/__tests__/logger.test.ts @@ -366,7 +366,7 @@ describe('debug contexts', () => { const timestamp = Date.now() const message = nanoid() const logger = new Logger({ - // @ts-ignore + // @ts-expect-error context: 'specific', level: LogLevel.Debug, }) @@ -388,7 +388,7 @@ describe('debug contexts', () => { const timestamp = Date.now() const message = nanoid() const logger = new Logger({ - // @ts-ignore + // @ts-expect-error context: 'namespace:foo', contextFilter: 'namespace:*', level: LogLevel.Debug, @@ -411,7 +411,7 @@ describe('debug contexts', () => { const timestamp = Date.now() const message = nanoid() const logger = new Logger({ - // @ts-ignore + // @ts-expect-error context: 'namespace:bar:baz', contextFilter: 'namespace:foo:*', }) diff --git a/src/platform/markBundleStartTime.ts b/src/platform/markBundleStartTime.ts index cd64c9f1c3..0d6ff46377 100644 --- a/src/platform/markBundleStartTime.ts +++ b/src/platform/markBundleStartTime.ts @@ -1,2 +1,2 @@ -// @ts-ignore Web-only. On RN, this is set by Metro. +// @ts-expect-error Web-only. On RN, this is set by Metro. window.__BUNDLE_START_TIME__ = performance.now() diff --git a/src/screens/Hashtag.tsx b/src/screens/Hashtag.tsx index 10d0c91884..d9d94f30c8 100644 --- a/src/screens/Hashtag.tsx +++ b/src/screens/Hashtag.tsx @@ -271,7 +271,6 @@ function HashtagScreenTab({ onEndReached={onEndReached} onEndReachedThreshold={4} onItemSeen={trackPostView} - // @ts-ignore web only -prf desktopFixedHeight ListFooterComponent={ ( observer.disconnect() } else { diff --git a/src/screens/Profile/KnownFollowers.tsx b/src/screens/Profile/KnownFollowers.tsx index 5ccc70c16f..69f93d19c9 100644 --- a/src/screens/Profile/KnownFollowers.tsx +++ b/src/screens/Profile/KnownFollowers.tsx @@ -128,7 +128,6 @@ export const ProfileKnownFollowersScreen = ({route}: Props) => { onRetry={fetchNextPage} /> } - // @ts-ignore our .web version only -prf desktopFixedHeight initialNumToRender={initialNumToRender} windowSize={11} diff --git a/src/screens/Signup/StepCaptcha/CaptchaWebView.web.tsx b/src/screens/Signup/StepCaptcha/CaptchaWebView.web.tsx index b8c3832607..5cd24666ed 100644 --- a/src/screens/Signup/StepCaptcha/CaptchaWebView.web.tsx +++ b/src/screens/Signup/StepCaptcha/CaptchaWebView.web.tsx @@ -3,7 +3,6 @@ import {StyleSheet} from 'react-native' import {type CaptchaWebViewProps} from './CaptchaWebView.shared' -// @ts-ignore web only, we will always redirect to the app on web (CORS) const REDIRECT_HOST = new URL(window.location.href).host export function CaptchaWebView({ @@ -25,13 +24,11 @@ export function CaptchaWebView({ }, [onError]) const onLoad = useCallback(() => { - // @ts-ignore web const frame: HTMLIFrameElement = document.getElementById( 'captcha-iframe', ) as HTMLIFrameElement try { - // @ts-ignore web const href = frame?.contentWindow?.location.href if (!href) return const urlp = new URL(href) diff --git a/src/screens/Topic.tsx b/src/screens/Topic.tsx index 6e3be7c2a7..db5ba4ae10 100644 --- a/src/screens/Topic.tsx +++ b/src/screens/Topic.tsx @@ -177,7 +177,6 @@ function TopicScreenTab({ onEndReached={onEndReached} onEndReachedThreshold={4} onItemSeen={trackPostView} - // @ts-ignore web only -prf desktopFixedHeight ListFooterComponent={ uri.includes(currentAccount.did)) if (!root) break diff --git a/src/state/persisted/schema.ts b/src/state/persisted/schema.ts index 58229b3deb..e5a3c0b372 100644 --- a/src/state/persisted/schema.ts +++ b/src/state/persisted/schema.ts @@ -209,7 +209,7 @@ export function tryParse(rawData: string): Schema | undefined { const errors = parsed.error?.errors?.map(e => ({ code: e.code, - // @ts-ignore exists on some types + // @ts-expect-error exists on some types expected: e?.expected, path: e.path?.join('.'), })) || [] diff --git a/src/state/queries/nuxs/index.ts b/src/state/queries/nuxs/index.ts index 69ab7691a4..e09dc5898d 100644 --- a/src/state/queries/nuxs/index.ts +++ b/src/state/queries/nuxs/index.ts @@ -45,7 +45,7 @@ export function useNuxs(): // const queryClient = useQueryClient() // const pdsClient = usePdsClient() - // // @ts-ignore + // // @ts-expect-error // window.clearNux = async (ids: string[]) => { // await pdsClient.call(removeNuxs, ids) // // triggers a refetch diff --git a/src/state/queries/usePostThread/utils.ts b/src/state/queries/usePostThread/utils.ts index dde80db181..aeab5f75dd 100644 --- a/src/state/queries/usePostThread/utils.ts +++ b/src/state/queries/usePostThread/utils.ts @@ -90,7 +90,7 @@ export function getTraversalMetadata({ } if (isDevMode()) { - // @ts-ignore dev only for debugging + // @ts-expect-error dev only for debugging metadata.postData.text = getPostRecord(item.value.post).text } @@ -104,9 +104,9 @@ export function storeTraversalMetadata( metadatas.set(metadata.postData.uri, metadata) if (isDevMode()) { - // @ts-ignore dev only for debugging + // @ts-expect-error dev only for debugging metadatas.set(metadata.postData.text, metadata) - // @ts-ignore + // @ts-expect-error window.__thread = metadatas } } diff --git a/src/state/queries/usePostThread/views.ts b/src/state/queries/usePostThread/views.ts index a5661ae835..a3843878df 100644 --- a/src/state/queries/usePostThread/views.ts +++ b/src/state/queries/usePostThread/views.ts @@ -21,7 +21,7 @@ export function threadPostNoUnauthenticated({ uri, depth, value: value as app.bsky.unspecced.defs.ThreadItemNoUnauthenticated, - // @ts-ignore populated by the traversal + // @ts-expect-error populated by the traversal ui: {}, } } @@ -91,7 +91,7 @@ export function threadPost({ }, isBlurred, moderation, - // @ts-ignore populated by the traversal + // @ts-expect-error populated by the traversal ui: {}, } } diff --git a/src/storage/__tests__/index.test.ts b/src/storage/__tests__/index.test.ts index e11affa7a8..848c07b8e8 100644 --- a/src/storage/__tests__/index.test.ts +++ b/src/storage/__tests__/index.test.ts @@ -63,7 +63,7 @@ test(`removes multiple keys at once`, () => { test(`concatenates keys`, () => { store.remove([scope, 'str']) store.set([scope, 'str'], 'concat') - // @ts-ignore accessing these properties for testing purposes only + // @ts-expect-error accessing these properties for testing purposes only expect(store.store.getString(`${scope}${store.sep}str`)).toBeTruthy() }) diff --git a/src/view/com/auth/SplashScreen.tsx b/src/view/com/auth/SplashScreen.tsx index 32c04f3812..71851e2555 100644 --- a/src/view/com/auth/SplashScreen.tsx +++ b/src/view/com/auth/SplashScreen.tsx @@ -11,9 +11,9 @@ import {Logo} from '#/view/icons/Logo' import {Logotype} from '#/view/icons/Logotype' import {atoms as a, useTheme} from '#/alf' import {Button, ButtonText} from '#/components/Button' -// @ts-ignore +// @ts-expect-error import splashImagePointer from '../../../../assets/illustrations/illustration-mobile.png' -// @ts-ignore +// @ts-expect-error import darkSplashImagePointer from '../../../../assets/illustrations/illustration-mobile-dark.png' const splashImageUri = RNImage.resolveAssetSource(splashImagePointer)!.uri const darkSplashImageUri = RNImage.resolveAssetSource( diff --git a/src/view/com/composer/text-input/TextInput.tsx b/src/view/com/composer/text-input/TextInput.tsx index 85d9f22e21..6140fc046e 100644 --- a/src/view/com/composer/text-input/TextInput.tsx +++ b/src/view/com/composer/text-input/TextInput.tsx @@ -177,7 +177,6 @@ export function TextInput({ * Android impl of `PasteInput` doesn't support the array syntax for `fontVariant` */ if (IS_ANDROID) { - // @ts-ignore style.fontVariant = typeof style.fontVariant === 'string' ? style.fontVariant diff --git a/src/view/com/composer/text-input/TextInput.web.tsx b/src/view/com/composer/text-input/TextInput.web.tsx index 79f0c2db46..b709f262f5 100644 --- a/src/view/com/composer/text-input/TextInput.web.tsx +++ b/src/view/com/composer/text-input/TextInput.web.tsx @@ -344,7 +344,7 @@ export function TextInput({ return ( <> - {/* @ts-ignore inputStyle is fine */} + {/* @ts-expect-error inputStyle is fine */} @@ -479,7 +479,7 @@ const styles = StyleSheet.create({ pointerEvents: 'none', alignItems: 'center', justifyContent: 'center', - // @ts-ignore web only -prf + // @ts-expect-error web only -prf position: 'fixed', padding: 16, top: 0, @@ -488,7 +488,6 @@ const styles = StyleSheet.create({ right: 0, }, dropModal: { - // @ts-ignore web only boxShadow: 'rgba(0, 0, 0, 0.3) 0px 5px 20px', padding: 8, borderWidth: 1, diff --git a/src/view/com/composer/text-input/web/Autocomplete.tsx b/src/view/com/composer/text-input/web/Autocomplete.tsx index 21d8e37b59..144d4e29ba 100644 --- a/src/view/com/composer/text-input/web/Autocomplete.tsx +++ b/src/view/com/composer/text-input/web/Autocomplete.tsx @@ -58,7 +58,7 @@ export function createSuggestion({ return } - // @ts-ignore getReferenceClientRect doesnt like that clientRect can return null -prf + // @ts-expect-error getReferenceClientRect doesnt like that clientRect can return null -prf popup = tippy('body', { getReferenceClientRect: props.clientRect, appendTo: () => document.body, @@ -78,7 +78,7 @@ export function createSuggestion({ } popup?.[0]?.setProps({ - // @ts-ignore getReferenceClientRect doesnt like that clientRect can return null -prf + // @ts-expect-error getReferenceClientRect doesnt like that clientRect can return null -prf getReferenceClientRect: props.clientRect, }) }, diff --git a/src/view/com/post-thread/PostQuotes.tsx b/src/view/com/post-thread/PostQuotes.tsx index 7bd63d1992..29aae55c80 100644 --- a/src/view/com/post-thread/PostQuotes.tsx +++ b/src/view/com/post-thread/PostQuotes.tsx @@ -135,7 +135,6 @@ export function PostQuotes({uri}: {uri: string}) { endMessageText={_(msg`That's all, folks!`)} /> } - // @ts-ignore our .web version only -prf desktopFixedHeight initialNumToRender={initialNumToRender} windowSize={11} diff --git a/src/view/com/post-thread/PostRepostedBy.tsx b/src/view/com/post-thread/PostRepostedBy.tsx index 06bdda13df..4b29d42c81 100644 --- a/src/view/com/post-thread/PostRepostedBy.tsx +++ b/src/view/com/post-thread/PostRepostedBy.tsx @@ -115,7 +115,6 @@ export function PostRepostedBy({uri}: {uri: string}) { onRetry={fetchNextPage} /> } - // @ts-ignore our .web version only -prf desktopFixedHeight initialNumToRender={initialNumToRender} windowSize={11} diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx index 94398778e8..72f79f5899 100644 --- a/src/view/com/post/Post.tsx +++ b/src/view/com/post/Post.tsx @@ -276,7 +276,6 @@ const styles = StyleSheet.create({ paddingRight: 15, paddingBottom: 5, paddingLeft: 10, - // @ts-ignore web only -prf cursor: 'pointer', }, layout: { diff --git a/src/view/com/profile/ProfileFollowers.tsx b/src/view/com/profile/ProfileFollowers.tsx index ded4eed990..eb6353a2c2 100644 --- a/src/view/com/profile/ProfileFollowers.tsx +++ b/src/view/com/profile/ProfileFollowers.tsx @@ -246,7 +246,6 @@ export function ProfileFollowers({name}: {name: string}) { onRetry={fetchNextPage} /> } - // @ts-ignore our .web version only -prf desktopFixedHeight initialNumToRender={initialNumToRender} windowSize={11} diff --git a/src/view/com/profile/ProfileFollows.tsx b/src/view/com/profile/ProfileFollows.tsx index 86755904db..18cee46839 100644 --- a/src/view/com/profile/ProfileFollows.tsx +++ b/src/view/com/profile/ProfileFollows.tsx @@ -229,7 +229,6 @@ export function ProfileFollows({name}: {name: string}) { onRetry={fetchNextPage} /> } - // @ts-ignore our .web version only -prf desktopFixedHeight initialNumToRender={initialNumToRender} windowSize={11} diff --git a/src/view/com/util/EventStopper.tsx b/src/view/com/util/EventStopper.tsx index fe81ac4c8f..e30b06ae33 100644 --- a/src/view/com/util/EventStopper.tsx +++ b/src/view/com/util/EventStopper.tsx @@ -22,7 +22,6 @@ export function EventStopper({ true} onTouchEnd={stop} - // @ts-ignore web only -prf onClick={stop} onKeyDown={onKeyDown ? stop : undefined} style={style}> diff --git a/src/view/com/util/Link.tsx b/src/view/com/util/Link.tsx index 52a5e14944..78bab551d4 100644 --- a/src/view/com/util/Link.tsx +++ b/src/view/com/util/Link.tsx @@ -131,13 +131,13 @@ export const Link = memo(function Link({ onAccessibilityAction?.(e) } }} - // @ts-ignore web only -sfn + // @ts-expect-error web only -sfn dataSet={dataSet} {...props} android_ripple={{ color: t.atoms.bg_contrast_25.backgroundColor, }}> - {/* @ts-ignore web only -prf */} + {/* @ts-expect-error web only -prf */} {children ? children : {title || 'link'}} @@ -156,7 +156,7 @@ export const Link = memo(function Link({ accessibilityRole="link" accessibilityLabel={props.accessibilityLabel ?? title} accessibilityHint={props.accessibilityHint} - // @ts-ignore web only -prf + // @ts-expect-error web only -prf href={anchorHref} dataSet={dataSet} {...props}> @@ -281,7 +281,7 @@ export const TextLink = memo(function TextLink({ lineHeight={lineHeight} dataSet={dataSet} title={title} - // @ts-ignore web only -prf + // @ts-expect-error web only -prf hrefAttrs={hrefAttrs} // hack to get open in new tab to work on safari. without this, safari will open in a new window onPress={onPress} accessibilityRole="link" @@ -384,12 +384,12 @@ function onPressInner( ) { let shouldHandle = false const isLeftClick = - // @ts-ignore Web only -prf + // @ts-expect-error Web only -prf Platform.OS === 'web' && (e.button == null || e.button === 0) - // @ts-ignore Web only -prf + // @ts-expect-error Web only -prf const isMiddleClick = Platform.OS === 'web' && e.button === 1 const isMetaKey = - // @ts-ignore Web only -prf + // @ts-expect-error Web only -prf Platform.OS === 'web' && (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) const newTab = isMetaKey || isMiddleClick @@ -398,7 +398,7 @@ function onPressInner( } else if ( !e.defaultPrevented && // onPress prevented default (isLeftClick || isMiddleClick) && // ignore everything but left and middle clicks - // @ts-ignore Web only -prf + // @ts-expect-error Web only -prf [undefined, null, '', 'self'].includes(e.currentTarget?.target) // let browser handle "target=_blank" etc. ) { e.preventDefault() @@ -422,10 +422,8 @@ function onPressInner( } else { const [routeName, params] = router.matchPath(href) if (navigationAction === 'push') { - // @ts-ignore we're not able to type check on this one -prf navigation.dispatch(StackActions.push(routeName, params)) } else if (navigationAction === 'replace') { - // @ts-ignore we're not able to type check on this one -prf navigation.dispatch(StackActions.replace(routeName, params)) } else if (navigationAction === 'navigate') { const state = navigation.getState() @@ -435,7 +433,7 @@ function onPressInner( } else { // note: 'navigate' actually acts the same as 'push' nowadays // therefore we need to add 'pop' -sfn - // @ts-ignore we're not able to type check on this one -prf + // @ts-expect-error we're not able to type check on this one -prf navigation.navigate(routeName, params, {pop: true}) } } else { diff --git a/src/view/com/util/List.web.tsx b/src/view/com/util/List.web.tsx index 43be01810f..1ee8ff78ed 100644 --- a/src/view/com/util/List.web.tsx +++ b/src/view/com/util/List.web.tsx @@ -119,7 +119,7 @@ function ListImpl( if (isValidElement(ListHeaderComponent)) { headerComponent = ListHeaderComponent } else { - // @ts-ignore Nah it's fine. + // @ts-expect-error Nah it's fine. headerComponent = } } @@ -129,7 +129,7 @@ function ListImpl( if (isValidElement(ListFooterComponent)) { footerComponent = ListFooterComponent } else { - // @ts-ignore Nah it's fine. + // @ts-expect-error Nah it's fine. footerComponent = } } @@ -139,7 +139,7 @@ function ListImpl( if (isValidElement(ListEmptyComponent)) { emptyComponent = ListEmptyComponent } else { - // @ts-ignore Nah it's fine. + // @ts-expect-error Nah it's fine. emptyComponent = } } @@ -793,11 +793,10 @@ export const List = memo(forwardRef(ListImpl)) as ( const styles = StyleSheet.create({ minHeightViewport: { - // @ts-ignore web only minHeight: '100vh', }, parentTreeVisibilityDetector: { - // @ts-ignore web only + // @ts-expect-error web only position: 'fixed', top: 0, left: 0, diff --git a/src/view/com/util/WebAuxClickWrapper.tsx b/src/view/com/util/WebAuxClickWrapper.tsx index 0f843b74d2..55559d05e8 100644 --- a/src/view/com/util/WebAuxClickWrapper.tsx +++ b/src/view/com/util/WebAuxClickWrapper.tsx @@ -21,7 +21,7 @@ export function WebAuxClickWrapper({children}: React.PropsWithChildren<{}>) { if (Platform.OS !== 'web') return children return ( - // @ts-ignore web only + // @ts-expect-error web only
{children}
diff --git a/src/view/com/util/fab/FABInner.tsx b/src/view/com/util/fab/FABInner.tsx index f2e96fcbec..3077e8ac14 100644 --- a/src/view/com/util/fab/FABInner.tsx +++ b/src/view/com/util/fab/FABInner.tsx @@ -82,7 +82,7 @@ const styles = StyleSheet.create({ borderRadius: 35, }, outer: { - // @ts-ignore web-only + // @ts-expect-error web-only position: IS_WEB ? 'fixed' : 'absolute', zIndex: 1, cursor: 'pointer', diff --git a/src/view/com/util/layouts/LoggedOutLayout.tsx b/src/view/com/util/layouts/LoggedOutLayout.tsx index 76a2e50205..633f21dd99 100644 --- a/src/view/com/util/layouts/LoggedOutLayout.tsx +++ b/src/view/com/util/layouts/LoggedOutLayout.tsx @@ -98,7 +98,6 @@ export const LoggedOutLayout = ({ const styles = StyleSheet.create({ container: { flexDirection: 'row', - // @ts-ignore web only height: '100vh', }, side: { diff --git a/src/view/com/util/text/Text.tsx b/src/view/com/util/text/Text.tsx index 103ce3a5f1..cfbee15651 100644 --- a/src/view/com/util/text/Text.tsx +++ b/src/view/com/util/text/Text.tsx @@ -68,12 +68,8 @@ function Text_DEPRECATED({ applyFonts(flattened, fonts.family) - // should always be defined on `typography` - // @ts-ignore if (flattened.fontSize) { - // @ts-ignore flattened.fontSize = Math.round( - // @ts-ignore flattened.fontSize * fonts.scaleMultiplier, ) } diff --git a/src/view/icons/Logo.tsx b/src/view/icons/Logo.tsx index 4735295649..394045a619 100644 --- a/src/view/icons/Logo.tsx +++ b/src/view/icons/Logo.tsx @@ -29,7 +29,7 @@ export const Logo = forwardRef(function LogoImpl(props: Props, ref) { const _fill = gradient ? 'url(#sky)' : fill || styles?.color || t.palette.primary_500 - // @ts-ignore it's fiiiiine + // @ts-expect-error it's fiiiiine const size = parseInt(rest.width || 32, 10) const logoVariant = useLogoVariant(allowVariants) @@ -56,7 +56,7 @@ export const Logo = forwardRef(function LogoImpl(props: Props, ref) { return ( diff --git a/src/view/screens/Home.tsx b/src/view/screens/Home.tsx index 2303b69268..3bdfa82b62 100644 --- a/src/view/screens/Home.tsx +++ b/src/view/screens/Home.tsx @@ -223,7 +223,7 @@ function HomeScreenReady({ {...props} testID="homeScreenFeedTabs" onPressSelected={onPressSelected} - // @ts-ignore + // @ts-expect-error feeds={[{displayName: 'Following'}, {displayName: 'Discover'}]} /> ) diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx index e02f0cb4a0..70b223a08e 100644 --- a/src/view/screens/Profile.tsx +++ b/src/view/screens/Profile.tsx @@ -649,7 +649,7 @@ const styles = StyleSheet.create({ container: { flexDirection: 'column', height: '100%', - // @ts-ignore Web-only. + // @ts-expect-error Web-only. overflowAnchor: 'none', // Fixes jumps when switching tabs while scrolled down. }, loading: {