Add no-extraneous-dependencies and no-nodejs-modules eslint rules (#10151)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {useMemo} from 'react'
|
||||
import {useNavigation} from '@react-navigation/core'
|
||||
import {useNavigation} from '@react-navigation/native'
|
||||
|
||||
import {useDedupe} from '#/lib/hooks/useDedupe'
|
||||
import {type NavigationProp} from '#/lib/routes/types'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {useEffect, useMemo, useState} from 'react'
|
||||
import {type EventArg, useNavigation} from '@react-navigation/core'
|
||||
import {type EventArg, useNavigation} from '@react-navigation/native'
|
||||
|
||||
if ('scrollRestoration' in history) {
|
||||
// Tell the brower not to mess with the scroll.
|
||||
|
||||
@@ -15,7 +15,6 @@ import {
|
||||
import {manipulateAsync, SaveFormat} from 'expo-image-manipulator'
|
||||
import * as MediaLibrary from 'expo-media-library'
|
||||
import * as Sharing from 'expo-sharing'
|
||||
import {Buffer} from 'buffer'
|
||||
|
||||
import {POST_IMG_MAX} from '#/lib/constants'
|
||||
import {logger} from '#/logger'
|
||||
@@ -322,7 +321,12 @@ export async function saveBytesToDisk(
|
||||
bytes: Uint8Array,
|
||||
type: string,
|
||||
) {
|
||||
const encoded = Buffer.from(bytes).toString('base64')
|
||||
// ideally we'd use `bytes.toBase64()`, but that's only baseline newly available
|
||||
let binary = ''
|
||||
for (const byte of bytes) {
|
||||
binary += String.fromCharCode(byte)
|
||||
}
|
||||
const encoded = btoa(binary)
|
||||
return await saveToDevice(filename, encoded, type)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {XRPCError} from '@atproto/xrpc'
|
||||
import {XRPCError} from '@atproto/api'
|
||||
import {t} from '@lingui/core/macro'
|
||||
|
||||
export function cleanError(str: any): string {
|
||||
|
||||
Reference in New Issue
Block a user