Skip to content

Commit

Permalink
chore: dead code expo (#608)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudambro authored Jul 22, 2024
1 parent f3f6a5d commit 0abc3a9
Show file tree
Hide file tree
Showing 129 changed files with 2,961 additions and 3,818 deletions.
7 changes: 7 additions & 0 deletions expo/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// https://docs.expo.dev/guides/using-eslint/
module.exports = {
extends: "expo",
env: {
node: true,
},
};
2 changes: 0 additions & 2 deletions expo/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// Without dotenv, you can access .env
// import "dotenv/config";
import { type ExpoConfig, type ConfigContext } from "expo/config";
import version from "./app.versions.json";

Expand Down
27 changes: 14 additions & 13 deletions expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
"scripts": {
"get-ip": "./get-ip.sh && echo \"this script updates the API IP to your own IP, because that's what Android Emulator needs to work. It's based on your wifi IP, if you need ethernet it won't work (needs en1 instead of en0)\"",
"start": "expo start --dev-client",
"prebuild": "/bin/sh -c 'export $(grep -v ^'#' .env.local | xargs) && yarn eas-build-pre-install && npx expo prebuild --clean && rm ./google-services.json'",
"prebuild": "/bin/sh -c 'export $(grep -v ^'#' .env.local | xargs) && yarn eas-build-pre-install && npx expo prebuild --clean && rm ./google-services.json' && rm ./ios/.xcode.env.local",
"android": "expo run:android",
"ios": "expo run:ios",
"test": "jest --watchAll",
"lint": "expo lint",
"lint-fix": "expo lint --fix",
"eas-build-pre-install": "echo \"This command is also run before `eas build` locally or in the cloud'\" && echo \"This command is also run before `eas build` locally or in the cloud'\" && node generate-google-service-json.js",
"eas-build-post-install": "rm ./ios/.xcode.env.local",
"load-env": "/bin/sh -c 'export $(grep -v ^'#' .env.production | xargs)'",
"build-eas:ios": "eas build -p ios",
"build-eas-then-submit:ios": "eas build -p ios && eas submit -p ios --latest",
Expand All @@ -20,18 +21,16 @@
"build-local:ios-ipa:debug": "echo \"This script retains XCode logs for debugging build failures. Look for a message like 'Skipping cleanup, {path/to/logs} won't be removed.'\" && /bin/sh -c 'export $(grep -v ^'#' .env.production | xargs) && EAS_LOCAL_BUILD_SKIP_CLEANUP=1 eas build -p ios --local'",
"build-local:android-aab": "/bin/sh -c 'export $(grep -v ^'#' .env.production | xargs) && eas build -p android --local'",
"expo-config": "npx expo config",
"update-mobile-app-version": "node ./update-mobile-app-version.js"
"update-mobile-app-version": "node ./update-mobile-app-version.js",
"knip": "knip"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/vector-icons": "^14.0.2",
"@react-native-community/checkbox": "^0.5.17",
"@react-native-community/datetimepicker": "8.0.1",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-community/netinfo": "11.3.1",
"@react-native-community/push-notification-ios": "^1.11.0",
"@react-navigation/bottom-tabs": "^6.5.11",
"@react-navigation/native": "^6.1.9",
"@react-navigation/native-stack": "^6.9.17",
Expand All @@ -41,6 +40,7 @@
"base-64": "^1.0.0",
"dayjs": "^1.11.11",
"expo": "^51.0.18",
"expo-application": "^5.9.1",
"expo-build-properties": "^0.12.3",
"expo-checkbox": "^3.0.0",
"expo-constants": "^16.0.2",
Expand All @@ -57,8 +57,6 @@
"react-dom": "18.2.0",
"react-native": "^0.74.3",
"react-native-awesome-slider": "^2.5.3",
"react-native-calendars": "^1.1305.0",
"react-native-config": "^1.5.2",
"react-native-device-info": "^11.1.0",
"react-native-draggable-flatlist": "^4.0.1",
"react-native-fast-image": "^8.6.3",
Expand All @@ -70,12 +68,10 @@
"react-native-reanimated": "~3.10.1",
"react-native-safe-area-context": "4.10.1",
"react-native-screens": "3.31.1",
"react-native-speedometer-chart": "^0.7.5",
"react-native-svg": "15.2.0",
"react-native-swipe-list-view": "^3.2.9",
"react-native-swiper": "^1.6.0",
"react-native-tab-view": "^3.5.2",
"react-native-web": "^0.19.10",
"react-native-webview": "13.8.6",
"react-native-youtube-iframe": "^2.3.0",
"recoil": "^0.7.7",
Expand All @@ -87,19 +83,24 @@
"devDependencies": {
"@babel/core": "^7.24.8",
"@types/base-64": "^1",
"@types/eslint": "^8",
"@types/jest": "^29.5.12",
"@types/node": "^20.14.11",
"@types/react": "~18.2.79",
"@types/react-native-get-random-values": "^1",
"@types/react-test-renderer": "^18.0.7",
"@types/semver": "^7",
"@types/urijs": "^1",
"@types/uuid": "^10",
"@types/validator": "^13",
"dotenv": "^16.4.5",
"babel-preset-expo": "^11.0.12",
"eslint": "^8.57.0",
"eslint-config-expo": "^7.0.0",
"jest": "^29.4.0",
"jest-expo": "^51.0.3",
"react-test-renderer": "^18.2.0",
"knip": "^5.26.0",
"semver": "^7.6.3",
"tailwindcss": "3.3.2",
"typescript": "~5.3.3"
"typescript": "^5.5.3"
},
"private": true
}
2 changes: 1 addition & 1 deletion expo/src/Router.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useMemo, useRef } from "react";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { NavigationContainer } from "@react-navigation/native";
import { Alert, Linking, View } from "react-native";
import { Alert, Linking } from "react-native";
import styled from "styled-components";
import { useRecoilState, useRecoilValue } from "recoil";
import * as SplashScreen from "expo-splash-screen";
Expand Down
2 changes: 1 addition & 1 deletion expo/src/components/BackButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { mediaHeight } from "../styles/mediaQueries";
import { defaultPaddingFontScale } from "../styles/theme";
import TextStyled from "./TextStyled";

export const BackButton = ({ onPress, marginBottom, marginLeft, marginTop }) => (
const BackButton = ({ onPress, marginBottom, marginLeft, marginTop }) => (
<Container
onPress={onPress}
marginBottom={marginBottom}
Expand Down
13 changes: 6 additions & 7 deletions expo/src/components/Background.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import React from 'react';
import { View, SafeAreaView } from 'react-native';
import { SafeAreaView as Safe2 } from 'react-native-safe-area-context';
import React from "react";
import { View, SafeAreaView } from "react-native";

const Background = ({ neverBottom, children, color, withSwiperContainer, debug }) => {
const Container = withSwiperContainer ? SwiperContainer : React.Fragment;
const safeAreaProps = neverBottom ? { forceInset: { bottom: 'never' } } : {};
const safeAreaProps = neverBottom ? { forceInset: { bottom: "never" } } : {};
return (
<>
<SafeAreaView
Expand All @@ -16,7 +15,7 @@ const Background = ({ neverBottom, children, color, withSwiperContainer, debug }
// borderColor: 'red',
}}>
<View
className={['w-full h-full'].join(' ')}
className={["w-full h-full"].join(" ")}
style={{
background: color,
// borderWidth: debug ? 3 : 0,
Expand All @@ -41,8 +40,8 @@ const Background = ({ neverBottom, children, color, withSwiperContainer, debug }
const SwiperContainer = ({ children, debug }) => {
return (
<View
className={['h-full flex-grow flex-shrink-0'].join(' ')}
style={{ borderColor: 'red', borderWidth: debug ? 3 : 0 }}>
className={["h-full flex-grow flex-shrink-0"].join(" ")}
style={{ borderColor: "red", borderWidth: debug ? 3 : 0 }}>
{children}
</View>
);
Expand Down
Loading

0 comments on commit 0abc3a9

Please sign in to comment.