Skip to content

Commit 81d2659

Browse files
authored
chore(lint): Commit local lint fixes (#5928)
1 parent c26570f commit 81d2659

File tree

12 files changed

+43
-79
lines changed

12 files changed

+43
-79
lines changed

samples/expo/app/(tabs)/_layout.tsx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
import React from 'react';
21
import FontAwesome from '@expo/vector-icons/FontAwesome';
32
import { Link, Tabs } from 'expo-router';
3+
import React from 'react';
44
import { Pressable } from 'react-native';
55

6-
import Colors from '@/constants/Colors';
7-
import { useColorScheme } from '@/components/useColorScheme';
86
import { useClientOnlyValue } from '@/components/useClientOnlyValue';
7+
import { useColorScheme } from '@/components/useColorScheme';
8+
import Colors from '@/constants/Colors';
99

1010
// You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/
11-
function TabBarIcon(props: {
12-
name: React.ComponentProps<typeof FontAwesome>['name'];
13-
color: string;
14-
}) {
11+
function TabBarIcon(props: { name: React.ComponentProps<typeof FontAwesome>['name']; color: string }) {
1512
return <FontAwesome size={28} style={{ marginBottom: -3 }} {...props} />;
1613
}
1714

@@ -39,10 +36,7 @@ function InfoButton({ colorScheme }: { colorScheme: 'light' | 'dark' | null }) {
3936
export default function TabLayout() {
4037
const colorScheme = useColorScheme();
4138

42-
const renderInfoButton = React.useCallback(
43-
() => <InfoButton colorScheme={colorScheme} />,
44-
[colorScheme],
45-
);
39+
const renderInfoButton = React.useCallback(() => <InfoButton colorScheme={colorScheme} />, [colorScheme]);
4640

4741
return (
4842
<Tabs
@@ -51,7 +45,8 @@ export default function TabLayout() {
5145
// Disable the static render of the header on web
5246
// to prevent a hydration error in React Navigation v6.
5347
headerShown: useClientOnlyValue(false, true),
54-
}}>
48+
}}
49+
>
5550
<Tabs.Screen
5651
name="index"
5752
options={{

samples/expo/app/(tabs)/index.tsx

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
import { Button, ScrollView, StyleSheet } from 'react-native';
21
import * as Sentry from '@sentry/react-native';
32
import { reloadAppAsync, isRunningInExpoGo } from 'expo';
43
import * as DevClient from 'expo-dev-client';
54
import { useRouter } from 'expo-router';
5+
import { useUpdates } from 'expo-updates';
6+
import * as WebBrowser from 'expo-web-browser';
7+
import React from 'react';
8+
import { Button, ScrollView, StyleSheet } from 'react-native';
69

710
import { Text, View } from '@/components/Themed';
811
import { setScopeProperties } from '@/utils/setScopeProperties';
9-
import React from 'react';
10-
import * as WebBrowser from 'expo-web-browser';
11-
import { useUpdates } from 'expo-updates';
12+
1213
import { isWeb } from '../../utils/isWeb';
1314

1415
export default function TabOneScreen() {
@@ -93,9 +94,7 @@ export default function TabOneScreen() {
9394
title="Native Crash"
9495
onPress={() => {
9596
if (isRunningInExpoGo()) {
96-
console.warn(
97-
'Not supported in Expo Go. Build the application to test this feature.',
98-
);
97+
console.warn('Not supported in Expo Go. Build the application to test this feature.');
9998
return;
10099
}
101100
Sentry.nativeCrash();
@@ -202,9 +201,7 @@ export default function TabOneScreen() {
202201
string: 'string',
203202
bigint: BigInt(123),
204203
});
205-
Sentry.captureMessage(
206-
'Message with different types of tags globally',
207-
);
204+
Sentry.captureMessage('Message with different types of tags globally');
208205
Sentry.setTags({
209206
number: undefined,
210207
boolean: undefined,

samples/expo/app/(tabs)/two.tsx

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { StyleSheet } from 'react-native';
21
import * as Sentry from '@sentry/react-native';
2+
import { StyleSheet } from 'react-native';
33

44
import EditScreenInfo from '@/components/EditScreenInfo';
55
import { Text, View } from '@/components/Themed';
@@ -8,25 +8,17 @@ export default function TabTwoScreen() {
88
return (
99
<View style={styles.container}>
1010
<Text style={styles.title}>Tab Two</Text>
11-
<View
12-
style={styles.separator}
13-
lightColor="#eee"
14-
darkColor="rgba(255,255,255,0.1)"
15-
/>
11+
<View style={styles.separator} lightColor="#eee" darkColor="rgba(255,255,255,0.1)" />
1612
<Sentry.Unmask>
1713
<Text>
18-
This is unmasked because it's direct child of Sentry.Unmask (can be
19-
masked if Sentry.Masked is used higher in the hierarchy)
14+
This is unmasked because it's direct child of Sentry.Unmask (can be masked if Sentry.Masked is used higher in
15+
the hierarchy)
2016
</Text>
2117
<Sentry.Mask>
22-
<Text>
23-
This is masked always because it's a child of a Sentry.Mask
24-
</Text>
18+
<Text>This is masked always because it's a child of a Sentry.Mask</Text>
2519
<Sentry.Unmask>
2620
{/* Sentry.Unmask does not override the Sentry.Mask from above in the hierarchy */}
27-
<Text>
28-
This is masked always because it's a child of Sentry.Mask
29-
</Text>
21+
<Text>This is masked always because it's a child of Sentry.Mask</Text>
3022
</Sentry.Unmask>
3123
</Sentry.Mask>
3224
</Sentry.Unmask>

samples/expo/app/+html.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ export default function Root({ children }: { children: React.ReactNode }) {
1010
<head>
1111
<meta charSet="utf-8" />
1212
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
13-
<meta
14-
name="viewport"
15-
content="width=device-width, initial-scale=1, shrink-to-fit=no"
16-
/>
13+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
1714

1815
{/*
1916
Disable body scrolling on web. This makes ScrollView components work closer to how they do on native.

samples/expo/app/_layout.tsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
11
import FontAwesome from '@expo/vector-icons/FontAwesome';
2-
import {
3-
DarkTheme,
4-
DefaultTheme,
5-
ThemeProvider,
6-
} from '@react-navigation/native';
2+
import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native';
3+
import * as Sentry from '@sentry/react-native';
74
import { isRunningInExpoGo } from 'expo';
85
import { useFonts } from 'expo-font';
6+
import * as ImagePicker from 'expo-image-picker';
97
import { SplashScreen, Stack, useNavigationContainerRef } from 'expo-router';
108
import { useEffect } from 'react';
9+
import { LogBox } from 'react-native';
1110

1211
import { useColorScheme } from '@/components/useColorScheme';
12+
1313
import { SENTRY_INTERNAL_DSN } from '../utils/dsn';
14-
import * as Sentry from '@sentry/react-native';
15-
import { LogBox } from 'react-native';
16-
import * as ImagePicker from 'expo-image-picker';
1714

1815
export {
1916
// Catch any errors thrown by the Layout component.

samples/expo/app/modal.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ export default function ModalScreen() {
88
return (
99
<View style={styles.container}>
1010
<Text style={styles.title}>Modal</Text>
11-
<View
12-
style={styles.separator}
13-
lightColor="#eee"
14-
darkColor="rgba(255,255,255,0.1)"
15-
/>
11+
<View style={styles.separator} lightColor="#eee" darkColor="rgba(255,255,255,0.1)" />
1612
<EditScreenInfo path="app/modal.tsx" />
1713

1814
{/* Use a light status bar on iOS to account for the black space above the modal */}

samples/expo/components/EditScreenInfo.tsx

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,40 @@
11
import React from 'react';
22
import { StyleSheet } from 'react-native';
33

4+
import Colors from '@/constants/Colors';
5+
46
import { ExternalLink } from './ExternalLink';
57
import { MonoText } from './StyledText';
68
import { Text, View } from './Themed';
79

8-
import Colors from '@/constants/Colors';
9-
1010
export default function EditScreenInfo({ path }: { path: string }) {
1111
return (
1212
<View>
1313
<View style={styles.getStartedContainer}>
14-
<Text
15-
style={styles.getStartedText}
16-
lightColor="rgba(0,0,0,0.8)"
17-
darkColor="rgba(255,255,255,0.8)">
14+
<Text style={styles.getStartedText} lightColor="rgba(0,0,0,0.8)" darkColor="rgba(255,255,255,0.8)">
1815
Open up the code for this screen:
1916
</Text>
2017

2118
<View
2219
style={[styles.codeHighlightContainer, styles.homeScreenFilename]}
2320
darkColor="rgba(255,255,255,0.05)"
24-
lightColor="rgba(0,0,0,0.05)">
21+
lightColor="rgba(0,0,0,0.05)"
22+
>
2523
<MonoText>{path}</MonoText>
2624
</View>
2725

28-
<Text
29-
style={styles.getStartedText}
30-
lightColor="rgba(0,0,0,0.8)"
31-
darkColor="rgba(255,255,255,0.8)">
32-
Change any of the text, save the file, and your app will automatically
33-
update.
26+
<Text style={styles.getStartedText} lightColor="rgba(0,0,0,0.8)" darkColor="rgba(255,255,255,0.8)">
27+
Change any of the text, save the file, and your app will automatically update.
3428
</Text>
3529
</View>
3630

3731
<View style={styles.helpContainer}>
3832
<ExternalLink
3933
style={styles.helpLink}
40-
href="https://docs.expo.io/get-started/create-a-new-app/#opening-the-app-on-your-phonetablet">
34+
href="https://docs.expo.io/get-started/create-a-new-app/#opening-the-app-on-your-phonetablet"
35+
>
4136
<Text style={styles.helpLinkText} lightColor={Colors.light.tint}>
42-
Tap here if your app doesn't automatically update after making
43-
changes
37+
Tap here if your app doesn't automatically update after making changes
4438
</Text>
4539
</ExternalLink>
4640
</View>

samples/expo/components/ExternalLink.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ import * as WebBrowser from 'expo-web-browser';
33
import React from 'react';
44
import { Platform } from 'react-native';
55

6-
export function ExternalLink(
7-
props: Omit<React.ComponentProps<typeof Link>, 'href'> & { href: string },
8-
) {
6+
export function ExternalLink(props: Omit<React.ComponentProps<typeof Link>, 'href'> & { href: string }) {
97
return (
108
<Link
119
target="_blank"

samples/expo/components/StyledText.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { StyleSheet } from 'react-native';
2+
23
import { Text, TextProps } from './Themed';
34

45
export function MonoText(props: TextProps) {

samples/expo/components/Themed.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import { Text as DefaultText, View as DefaultView } from 'react-native';
77

88
import Colors from '@/constants/Colors';
9+
910
import { useColorScheme } from './useColorScheme';
1011

1112
type ThemeProps = {
@@ -39,10 +40,7 @@ export function Text(props: TextProps) {
3940

4041
export function View(props: ViewProps) {
4142
const { style, lightColor, darkColor, ...otherProps } = props;
42-
const backgroundColor = useThemeColor(
43-
{ light: lightColor, dark: darkColor },
44-
'background',
45-
);
43+
const backgroundColor = useThemeColor({ light: lightColor, dark: darkColor }, 'background');
4644

4745
return <DefaultView style={[{ backgroundColor }, style]} {...otherProps} />;
4846
}

0 commit comments

Comments
 (0)