Skip to content

Commit

Permalink
Upgrade dependencies, enable Hermes and refactor screens + components
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgianSorinMaxim committed Jul 22, 2022
1 parent 951d5b1 commit 0e4694a
Show file tree
Hide file tree
Showing 14,861 changed files with 74,176 additions and 2,706,056 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 1 addition & 4 deletions .eslint.json
Expand Up @@ -17,10 +17,7 @@
"prettier/react",
"prettier/standard"
],
"plugins": [
"@typescript-eslint",
"simple-import-sort"
],
"plugins": ["@typescript-eslint", "simple-import-sort"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 7,
Expand Down
63 changes: 63 additions & 0 deletions .flowconfig
@@ -0,0 +1,63 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js

; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/

; Ignore polyfills
node_modules/react-native/Libraries/polyfills/.*

; Flow doesn't support platforms
.*/Libraries/Utilities/LoadingView.js

[untyped]
.*/node_modules/@react-native-community/cli/.*/.*

[include]

[libs]
node_modules/react-native/interface.js
node_modules/react-native/flow/

[options]
emoji=true

exact_by_default=true

module.file_ext=.js
module.file_ext=.json
module.file_ext=.ios.js

munge_underscores=true

module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'

suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState

[lints]
sketchy-null-number=warn
sketchy-null-mixed=warn
sketchy-number=warn
untyped-type-import=warn
nonstrict-import=warn
deprecated-type=warn
unsafe-getters-setters=warn
inexact-spread=warn
unnecessary-invariant=warn

[strict]
deprecated-type
nonstrict-import
sketchy-null
unclear-type
unsafe-getters-setters
untyped-import
untyped-type-import

[version]
^0.176.3
10 changes: 5 additions & 5 deletions .github/dependabot.yml
@@ -1,10 +1,10 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: 'daily'
time: '21:00'
interval: "daily"
time: "21:00"
open-pull-requests-limit: 20
ignore:
- dependency-name: 'react-native'
- dependency-name: "react-native"
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Expand Up @@ -37,4 +37,4 @@ jobs:

# Tests
- name: Run unit tests
run: yarn jest
run: yarn jest
2 changes: 1 addition & 1 deletion .github/workflows/ts-ignore-counter.yml
Expand Up @@ -45,4 +45,4 @@ jobs:
curl -sL -X POST -d @- \
-H "Content-Type: application/json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/comments"
"https://api.github.com/repos/$GITHUB_REPOSITORY/commits/$GITHUB_SHA/comments"
8 changes: 8 additions & 0 deletions .gitignore
Expand Up @@ -21,6 +21,7 @@ DerivedData
*.ipa
*.xcuserstate
project.xcworkspace
ios/.xcode.env.local

# Android/IntelliJ
#
Expand All @@ -47,3 +48,10 @@ buck-out/

# vscode
*.vscode/

# Ruby / CocoaPods
/ios/Pods/
/vendor/bundle/


.env
7 changes: 7 additions & 0 deletions .prettierrc.js
@@ -0,0 +1,7 @@
module.exports = {
arrowParens: "avoid",
bracketSameLine: true,
singleQuote: false,
trailingComma: "all",
semi: true,
};
48 changes: 24 additions & 24 deletions App.tsx
@@ -1,13 +1,16 @@
import * as React from "react";
import React from "react";
import { Platform, StatusBar, StyleSheet, View, Text } from "react-native";
import { Provider } from "react-redux";
import Config from "react-native-config";

console.log("** Config", Config);

// Persistor
import { PersistGate } from "redux-persist/integration/react";

// Navigation
import { NavigationContainer } from "@react-navigation/native";
import { navigationRef } from './src/navigation/RootNavigation';
import { navigationRef } from "./src/navigation/RootNavigation";

import { Root } from "./src/screens/Root";

Expand All @@ -21,37 +24,34 @@ const Loading = () => (
</View>
);

class App extends React.Component {
render() {
return (
<View style={styles.container}>
<Provider store={store}>
<PersistGate loading={<Loading />} persistor={persistor}>
{Platform.OS === "ios" && <StatusBar barStyle="default" />}
<NavigationContainer
// @ts-ignore
ref={navigationRef}
>
<Root />
</NavigationContainer>
</PersistGate>
</Provider>
</View>
);
}
const App = () => {
return (
<View style={styles.container}>
<Provider store={store}>
<PersistGate loading={<Loading />} persistor={persistor}>
{Platform.OS === "ios" && <StatusBar barStyle="default" />}
<NavigationContainer
// @ts-ignore
ref={navigationRef}>
<Root />
</NavigationContainer>
</PersistGate>
</Provider>
</View>
);
};

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#fff"
backgroundColor: "#fff",
},
loadingContainer: {
height: "100%",
width: "100%",
justifyContent: "center",
alignItems: "center"
}
alignItems: "center",
},
});

export default App;
export default App;
6 changes: 6 additions & 0 deletions Gemfile
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.5'

ågem 'cocoapods', '~> 1.11', '>= 1.11.2'

1 comment on commit 0e4694a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ts-ignore's: 16 (unchanged)

Please sign in to comment.