Add no-extraneous-dependencies and no-nodejs-modules eslint rules (#10151)

This commit is contained in:
Samuel Newman
2026-04-02 08:34:12 -07:00
committed by GitHub
parent eb566c5fcc
commit 68a4d73d61
25 changed files with 66 additions and 72 deletions
+1 -1
View File
@@ -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 -1
View File
@@ -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.
+6 -2
View File
@@ -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 -1
View File
@@ -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 {