Skip to content

Commit 0bec960

Browse files
committed
fix: update eslint-config and lint apps/mobile
1 parent 0a6dee3 commit 0bec960

File tree

18 files changed

+4314
-1117
lines changed

18 files changed

+4314
-1117
lines changed

apps/mobile/CHANGELOG.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

apps/mobile/app.json

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,41 @@
11
{
22
"expo": {
3-
"name": "nativewind-expo-router",
4-
"slug": "nativewind-expo-router",
3+
"name": "expo-monorepo",
4+
"slug": "expo-monorepo",
55
"version": "1.0.0",
66
"orientation": "portrait",
7-
"icon": "./assets/images/icon.png",
8-
"scheme": "nativewind-expo-router",
9-
"userInterfaceStyle": "automatic",
7+
"icon": "./assets/icon.png",
108
"splash": {
11-
"image": "./assets/images/splash.png",
9+
"image": "./assets/splash.png",
1210
"resizeMode": "contain",
1311
"backgroundColor": "#ffffff"
1412
},
15-
"assetBundlePatterns": ["**/*"],
13+
"updates": {
14+
"fallbackToCacheTimeout": 0
15+
},
16+
"assetBundlePatterns": [
17+
"**/*"
18+
],
1619
"ios": {
17-
"supportsTablet": true,
18-
"userInterfaceStyle": "automatic",
19-
"requireFullScreen": true
20+
"bundleIdentifier": "com.bycedric.expomonorepo",
21+
"buildNumber": "1.0.0",
22+
"supportsTablet": true
2023
},
2124
"android": {
22-
"userInterfaceStyle": "automatic",
25+
"package": "com.bycedric.expomonorepo",
2326
"adaptiveIcon": {
24-
"foregroundImage": "./assets/images/adaptive-icon.png",
25-
"backgroundColor": "#ffffff"
27+
"foregroundImage": "./assets/adaptive-icon.png",
28+
"backgroundColor": "#FFFFFF"
2629
}
2730
},
2831
"web": {
2932
"bundler": "metro",
3033
"output": "static",
3134
"favicon": "./assets/images/favicon.png"
3235
},
33-
"plugins": [
34-
"expo-router",
35-
[
36-
"expo-screen-orientation",
37-
{
38-
"initialOrientation": "DEFAULT"
39-
}
40-
]
41-
],
4236
"experiments": {
4337
"tsconfigPaths": true,
4438
"typedRoutes": true
4539
}
4640
}
47-
}
41+
}

apps/mobile/app/(tabs)/_layout.tsx

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

55
// import Colors from "@/constants/Colors";
66

77
/**
88
* You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/
99
*/
1010
function TabBarIcon(props: {
11-
name: React.ComponentProps<typeof FontAwesome>["name"];
11+
name: React.ComponentProps<typeof FontAwesome>['name'];
1212
color: string;
1313
}) {
1414
return <FontAwesome size={28} style={{ marginBottom: -3 }} {...props} />;
1515
}
1616

1717
export default function TabLayout() {
18-
const colorScheme = useColorScheme();
18+
//const colorScheme = useColorScheme();
1919

2020
return (
2121
<Tabs
@@ -28,7 +28,7 @@ export default function TabLayout() {
2828
<Tabs.Screen
2929
name="index"
3030
options={{
31-
title: "Home",
31+
title: 'Home',
3232
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
3333
headerRight: () => (
3434
<Link href="/modal" asChild>
@@ -48,7 +48,7 @@ export default function TabLayout() {
4848
<Tabs.Screen
4949
name="two"
5050
options={{
51-
title: "Tab Two",
51+
title: 'Tab Two',
5252
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
5353
}}
5454
/>

apps/mobile/app/(tabs)/index.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { vars } from "nativewind";
2-
import { Text, View } from "react-native";
1+
import { vars } from 'nativewind';
2+
import { Text, View } from 'react-native';
33

44
const theme = vars({
5-
"--theme-fg": "blue",
5+
'--theme-fg': 'blue',
66
});
77

88
const App = () => {
@@ -14,9 +14,7 @@ const App = () => {
1414
<Text className="text-base font-bold active:scale-150 active:text-[--theme-fg] transition duration-[500ms]">
1515
Transitions
1616
</Text>
17-
<Text className="text-[14px] font-bold animate-none active:animate-bounce">
18-
Animations
19-
</Text>
17+
<Text className="text-[14px] font-bold animate-none active:animate-bounce">Animations</Text>
2018
</View>
2119
);
2220
};

apps/mobile/app/(tabs)/two.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Text, View } from "react-native";
1+
import { Text, View } from 'react-native';
22

33
export default function TabTwoScreen() {
44
return (

apps/mobile/app/[...missing].tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
import { Link, Stack } from "expo-router";
2-
import { StyleSheet } from "react-native";
3-
4-
import { Text, View } from "react-native";
1+
import { Link, Stack } from 'expo-router';
2+
import { StyleSheet, Text, View } from 'react-native';
53

64
export default function NotFoundScreen() {
75
return (
86
<>
9-
<Stack.Screen options={{ title: "Oops!" }} />
7+
<Stack.Screen options={{ title: 'Oops!' }} />
108
<View style={styles.container}>
119
<Text style={styles.title}>This screen doesn't exist.</Text>
1210

@@ -21,20 +19,20 @@ export default function NotFoundScreen() {
2119
const styles = StyleSheet.create({
2220
container: {
2321
flex: 1,
24-
alignItems: "center",
25-
justifyContent: "center",
22+
alignItems: 'center',
23+
justifyContent: 'center',
2624
padding: 20,
2725
},
2826
title: {
2927
fontSize: 20,
30-
fontWeight: "bold",
28+
fontWeight: 'bold',
3129
},
3230
link: {
3331
marginTop: 15,
3432
paddingVertical: 15,
3533
},
3634
linkText: {
3735
fontSize: 14,
38-
color: "#2e78b7",
36+
color: '#2e78b7',
3937
},
4038
});

apps/mobile/app/_layout.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
import "../global.css";
2-
import FontAwesome from "@expo/vector-icons/FontAwesome";
3-
import { useFonts } from "expo-font";
4-
import { SplashScreen, Stack } from "expo-router";
5-
import { vars } from "nativewind";
6-
import { memo, useEffect } from "react";
7-
import { View, StyleSheet } from "react-native";
1+
import '../global.css';
2+
import FontAwesome from '@expo/vector-icons/FontAwesome';
3+
import { useFonts } from 'expo-font';
4+
import { SplashScreen, Stack } from 'expo-router';
5+
import { memo, useEffect } from 'react';
6+
import { View, StyleSheet } from 'react-native';
87

98
export {
109
// Catch any errors thrown by the Layout component.
1110
ErrorBoundary,
12-
} from "expo-router";
11+
} from 'expo-router';
1312

1413
export const unstable_settings = {
1514
// Ensure that reloading on `/modal` keeps a back button present.
16-
initialRouteName: "(tabs)",
15+
initialRouteName: '(tabs)',
1716
};
1817

1918
// Prevent the splash screen from auto-hiding before asset loading is complete.
2019
SplashScreen.preventAutoHideAsync();
2120

2221
export default memo(function RootLayout() {
2322
const [loaded, error] = useFonts({
24-
SpaceMono: require("../assets/fonts/SpaceMono-Regular.ttf"),
23+
SpaceMono: require('../assets/fonts/SpaceMono-Regular.ttf'),
2524
...FontAwesome.font,
2625
});
2726

@@ -48,7 +47,7 @@ function RootLayoutNav() {
4847
<View style={StyleSheet.absoluteFill}>
4948
<Stack>
5049
<Stack.Screen name="(tabs)" options={{ headerShown: false }} />
51-
<Stack.Screen name="modal" options={{ presentation: "modal" }} />
50+
<Stack.Screen name="modal" options={{ presentation: 'modal' }} />
5251
</Stack>
5352
</View>
5453
);

apps/mobile/app/modal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Text, View } from "react-native";
1+
import { Text, View } from 'react-native';
22

33
export default function Modal() {
44
return (

apps/mobile/babel.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ module.exports = function (api) {
33
return {
44
presets: [
55
[
6-
"babel-preset-expo",
6+
'babel-preset-expo',
77
{
8-
jsxImportSource: "nativewind",
8+
jsxImportSource: 'nativewind',
99
},
1010
],
11-
"nativewind/babel",
11+
'nativewind/babel',
1212
],
1313
plugins: [
1414
// Required for expo-router
15-
"expo-router/babel",
16-
"react-native-reanimated/plugin",
15+
'expo-router/babel',
16+
'react-native-reanimated/plugin',
1717
],
1818
};
1919
};

apps/mobile/eas.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"cli": {
3+
"promptToConfigurePushNotifications": false
4+
},
5+
"build": {
6+
"monorepo": {
7+
"cache": {
8+
"key": "turbo",
9+
"paths": [
10+
"../../node_modules/.cache/turbo"
11+
]
12+
}
13+
},
14+
"development": {
15+
"extends": "monorepo",
16+
"distribution": "internal",
17+
"android": {
18+
"buildType": "apk"
19+
},
20+
"ios": {
21+
"resourceClass": "m1-medium"
22+
}
23+
},
24+
"production": {
25+
"extends": "monorepo",
26+
"distribution": "store",
27+
"android": {
28+
"buildType": "app-bundle"
29+
},
30+
"ios": {
31+
"resourceClass": "m1-medium"
32+
}
33+
}
34+
}
35+
}

0 commit comments

Comments
 (0)