Skip to content

Commit bb5f9bd

Browse files
committed
fix lint issues
1 parent 4a509a2 commit bb5f9bd

File tree

8 files changed

+12
-16
lines changed

8 files changed

+12
-16
lines changed

app.config.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
/* eslint-disable import/consistent-type-specifier-style */
2-
import { ExpoConfig, IOS } from '@expo/config-types'
1+
import type { ExpoConfig, IOS } from '@expo/config-types'
32

43
import packageJson from './package.json'
54

65
import type { OtaUpdatePriority } from '~/features/versionCheck/hooks/useOTAUpdate'
7-
import { Environment } from '~/types/env'
6+
import type { Environment } from '~/types/env'
87

98
declare const process: {
109
env: {
11-
EXPO_PUBLIC_APP_ENV: Environment
10+
EXPO_PUBLIC_APP_ENV?: Environment
1211
EXPO_PUBLIC_APP_VERSION: string
1312
EXPO_PUBLIC_BUILD_NUMBER: string
1413
}
@@ -32,7 +31,7 @@ const config = {
3231
otaUpdateUrl: '',
3332
}
3433

35-
const detectedEnvironment = process.env.EXPO_PUBLIC_APP_ENV || 'dev'
34+
const detectedEnvironment = process.env.EXPO_PUBLIC_APP_ENV ?? 'dev'
3635

3736
// your custom fonts
3837
const fonts = ['./assets/fonts/Domine-Bold.ttf']

app/(home)/_layout.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ export default function TabLayout() {
1717
}}
1818
>
1919
<Tabs.Screen
20-
name="index"
2120
options={{
2221
title: 'Dashboard',
2322
}}
23+
name="index"
2424
/>
2525
<Tabs.Screen
26-
name="profile"
2726
options={{
2827
title: 'Profile',
2928
}}
29+
name="profile"
3030
/>
3131
</Tabs>
3232
)

src/features/offlineCheck/components/OfflineMessage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export const OfflineMessage = () => {
2828
>
2929
<Pressable
3030
hitSlop={3}
31-
onPress={handleReload}
3231
style={{ flexDirection: 'row', alignItems: 'center' }}
32+
onPress={handleReload}
3333
>
3434
<Text>{`You are offline.${showReload ? ' Stuck?' : ''}`}</Text>
3535
{showReload && <Text>- try reloading the app</Text>}

src/features/ui/components/Button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const styles = StyleSheet.create({
2222
})
2323

2424
export const Button = ({ text, onPress }: ButtonProps) => (
25-
<TouchableOpacity onPress={onPress} style={styles.wrapper}>
25+
<TouchableOpacity style={styles.wrapper} onPress={onPress}>
2626
<Text style={styles.text}>{text}</Text>
2727
</TouchableOpacity>
2828
)

src/features/versionCheck/components/ForcedUpdate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import * as Linking from 'expo-linking'
22
import { useEffect } from 'react'
3-
import { View, Alert, AlertButton } from 'react-native'
3+
import { View, Alert, type AlertButton } from 'react-native'
44

55
import { getStoreLink } from '~/utils/getStoreLink'
66

src/provider/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useMMKVDevTools } from '@dev-plugins/react-native-mmkv'
22
import * as SplashScreen from 'expo-splash-screen'
3-
import React, { PropsWithChildren, useCallback, useEffect } from 'react'
3+
import React, { type PropsWithChildren, useCallback, useEffect } from 'react'
44
import { GestureHandlerRootView } from 'react-native-gesture-handler'
55

66
import { OfflineMessage } from '~/features/offlineCheck/components/OfflineMessage'

src/utils/scale.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ export const verticalScale = (size: number) =>
2626
export const moderateVerticalScale = (size: number, factor = 0.5) =>
2727
size + (verticalScale(size) - size) * factor
2828

29-
// eslint-disable-next-line id-length
3029
export const s = scale
3130
export const vs = verticalScale
3231
export const ms = moderateScale

src/utils/setFontScaling.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
2-
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
31
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
42
// @ts-nocheck
53

@@ -10,8 +8,8 @@ import { Text, TextInput } from 'react-native'
108
const MAXIMUM_FONT_SCALE = 1.25
119

1210
export const setFontScaling = () => {
13-
Text.defaultProps = Text.defaultProps || {}
11+
Text.defaultProps = Text.defaultProps ?? {}
1412
Text.defaultProps.maxFontSizeMultiplier = MAXIMUM_FONT_SCALE
15-
TextInput.defaultProps = TextInput.defaultProps || {}
13+
TextInput.defaultProps = TextInput.defaultProps ?? {}
1614
TextInput.defaultProps.maxFontSizeMultiplier = MAXIMUM_FONT_SCALE
1715
}

0 commit comments

Comments
 (0)