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
+4 -4
View File
@@ -1,4 +1,4 @@
import React from 'react'
import {createContext, useContext, useReducer} from 'react'
import {
type AppBskyFeedDefs,
type AppBskyGraphDefs,
@@ -41,12 +41,12 @@ interface State {
type TStateContext = [State, (action: Action) => void]
const StateContext = React.createContext<TStateContext>([
const StateContext = createContext<TStateContext>([
{} as State,
(_: Action) => {},
])
StateContext.displayName = 'StarterPackWizardStateContext'
export const useWizardState = () => React.useContext(StateContext)
export const useWizardState = () => useContext(StateContext)
function reducer(state: State, action: Action): State {
let updatedState = state
@@ -157,7 +157,7 @@ export function Provider({
}
}
const [state, dispatch] = React.useReducer(reducer, null, createInitialState)
const [state, dispatch] = useReducer(reducer, null, createInitialState)
return (
<StateContext.Provider value={[state, dispatch]}>
+3 -3
View File
@@ -1,4 +1,4 @@
import React from 'react'
import {useCallback, useEffect} from 'react'
import {Keyboard, View} from 'react-native'
import {KeyboardAwareScrollView} from 'react-native-keyboard-controller'
import {useSafeAreaInsets} from 'react-native-safe-area-context'
@@ -179,14 +179,14 @@ function WizardInner({
})
const parsed = parseStarterPackUri(currentStarterPack?.uri)
React.useEffect(() => {
useEffect(() => {
navigation.setOptions({
gestureEnabled: false,
})
}, [navigation])
useFocusEffect(
React.useCallback(() => {
useCallback(() => {
setMinimalShellMode(true)
return () => {