Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: latest react native and package versions and updated code #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
BUNDLE_PATH: "vendor/bundle"
BUNDLE_FORCE_RUBY_PLATFORM: 1
7 changes: 6 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,9 @@ buck-out/
# env
.env
.env.development
.env.production
.env.production

# testing
/coverage

metro.config.js
7 changes: 4 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"node": true,
"es6": true
},
"extends": ["plugin:react/recommended", "airbnb","plugin:jsdoc/recommended"],
"extends": ["plugin:react/recommended", "airbnb", "plugin:jsdoc/recommended"],
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
Expand All @@ -30,7 +30,7 @@
"unnamedComponents": "arrow-function"
}
],
"jsx-quotes": ["error", "prefer-single"],
"jsx-quotes": ["error", "prefer-double"],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"object-curly-newline": [
"error",
Expand All @@ -46,6 +46,7 @@
"no-underscore-dangle": ["error", { "allow": ["_raw"] }],
"global-require": "off",
"react/jsx-props-no-spreading": "off",
"jsdoc/check-access": 1
"jsdoc/check-access": 1,
"react/jsx-curly-newline": "off"
}
}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,7 @@ buck-out/
# env
.env
.env.development
.env.production
.env.production

# testing
/coverage
68 changes: 0 additions & 68 deletions .gitlab-ci.yml

This file was deleted.

5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
bracketSpacing: true,
singleQuote: true,
trailingComma: 'all',
};
11 changes: 11 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"search.useGlobalIgnoreFiles": true,
"search.useParentIgnoreFiles": true,
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "automatic",
"prettier.singleQuote": true,
"prettier.singleAttributePerLine": true,
"cSpell.words": [
"Moderat"
],
}
1 change: 1 addition & 0 deletions .watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
28 changes: 16 additions & 12 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import DatabaseProvider from '@nozbe/watermelondb/DatabaseProvider';
import codePush from 'react-native-code-push';
import * as Sentry from '@sentry/react-native';
import { store, persistor } from './src/redux/store';
import { realmContext } from './src/db/Configuration';
import api from './src/api/config';
// models
import schema from './src/models/schema';
Expand All @@ -28,13 +29,11 @@ import Card from './src/models/Card';
import Root from './src/screens/Root';
import ToastConfig from './src/components/ToastConfig';

if (__DEV__) {
import('./ReactotronConfig').then(() => 'Reactotron Configured');
} else {
// if (!__DEV__) {
Sentry.init({
dsn: api.SENTRY_URL,
});
}
// }

const codePushOptions = {
checkFrequency: codePush.CheckFrequency.ON_APP_RESUME,
Expand Down Expand Up @@ -66,16 +65,21 @@ export const database = new Database({
actionsEnabled: true,
});

// Create a realm context
const { RealmProvider } = realmContext;

const MyApp = () => {
return (
<DatabaseProvider database={database}>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<Root />
</PersistGate>
</Provider>
<Toast config={ToastConfig} visibilityTime={2000} />
</DatabaseProvider>
<RealmProvider>
<DatabaseProvider database={database}>
<Provider store={store}>
<PersistGate loading={null} persistor={persistor}>
<Root />
</PersistGate>
</Provider>
<Toast config={ToastConfig} visibilityTime={2000} />
</DatabaseProvider>
</RealmProvider>
);
};

Expand Down
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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.6.10"

gem 'cocoapods', '~> 1.12'
45 changes: 0 additions & 45 deletions ReactotronConfig.js

This file was deleted.

1 change: 1 addition & 0 deletions _node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18
55 changes: 0 additions & 55 deletions android/app/BUCK

This file was deleted.

Loading