Create codemod for addressing ESLint warnings (#10032)

This commit is contained in:
DS Boyce
2026-03-11 15:51:31 -07:00
committed by GitHub
parent 80429ec902
commit 1db01a09a8
240 changed files with 1560 additions and 1347 deletions
+10 -10
View File
@@ -1,4 +1,4 @@
import React from 'react'
import {useCallback, useEffect, useRef, useState} from 'react'
import {Alert, AppState, type AppStateStatus} from 'react-native'
import {nativeBuildVersion} from 'expo-application'
import {
@@ -67,7 +67,7 @@ async function updateTestflight() {
export function useApplyPullRequestOTAUpdate() {
const {currentlyRunning} = useUpdates()
const [pending, setPending] = React.useState(false)
const [pending, setPending] = useState(false)
const currentChannel = currentlyRunning?.channel
const isCurrentlyRunningPullRequestDeployment =
currentChannel?.startsWith('pull-request')
@@ -124,14 +124,14 @@ export function useApplyPullRequestOTAUpdate() {
export function useOTAUpdates() {
const shouldReceiveUpdates = isEnabled && !__DEV__
const appState = React.useRef<AppStateStatus>('active')
const lastMinimize = React.useRef(0)
const ranInitialCheck = React.useRef(false)
const timeout = React.useRef<NodeJS.Timeout>(undefined)
const appState = useRef<AppStateStatus>('active')
const lastMinimize = useRef(0)
const ranInitialCheck = useRef(false)
const timeout = useRef<NodeJS.Timeout>(undefined)
const {currentlyRunning, isUpdatePending} = useUpdates()
const currentChannel = currentlyRunning?.channel
const setCheckTimeout = React.useCallback(() => {
const setCheckTimeout = useCallback(() => {
timeout.current = setTimeout(async () => {
try {
await setExtraParams()
@@ -153,7 +153,7 @@ export function useOTAUpdates() {
}, 10e3)
}, [])
const onIsTestFlight = React.useCallback(async () => {
const onIsTestFlight = useCallback(async () => {
try {
await updateTestflight()
} catch (err: any) {
@@ -163,7 +163,7 @@ export function useOTAUpdates() {
}
}, [])
React.useEffect(() => {
useEffect(() => {
// We don't need to check anything if the current update is a PR update
if (currentChannel?.startsWith('pull-request')) {
return
@@ -186,7 +186,7 @@ export function useOTAUpdates() {
// After the app has been minimized for 15 minutes, we want to either A. install an update if one has become available
// or B check for an update again.
React.useEffect(() => {
useEffect(() => {
// We also don't start this timeout if the user is on a pull request update
if (!isEnabled || currentChannel?.startsWith('pull-request')) {
return