Skip to content

Commit e3c7223

Browse files
committed
Upgrade app to latest RN and packages
1 parent d735538 commit e3c7223

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+3686
-2957
lines changed

.editorconfig

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

.eslintrc.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
module.exports = {
22
root: true,
3-
extends: 'handlebarlabs',
4-
rules: {
5-
'import/extensions': 0,
6-
'react/state-in-constructor': 0,
7-
},
3+
extends: '@react-native-community',
84
};

.flowconfig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ node_modules/react-native/Libraries/polyfills/.*
1111
; Flow doesn't support platforms
1212
.*/Libraries/Utilities/LoadingView.js
1313

14+
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
15+
1416
[untyped]
1517
.*/node_modules/@react-native-community/cli/.*/.*
1618

@@ -23,11 +25,10 @@ node_modules/react-native/flow/
2325
[options]
2426
emoji=true
2527

26-
esproposal.optional_chaining=enable
27-
esproposal.nullish_coalescing=enable
28-
2928
exact_by_default=true
3029

30+
format.bracket_spacing=false
31+
3132
module.file_ext=.js
3233
module.file_ext=.json
3334
module.file_ext=.ios.js
@@ -63,4 +64,4 @@ untyped-import
6364
untyped-type-import
6465

6566
[version]
66-
^0.137.0
67+
^0.170.0

.gitattributes

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

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
legacy/
2+
13
# OSX
24
#
35
.DS_Store
@@ -28,6 +30,7 @@ build/
2830
.gradle
2931
local.properties
3032
*.iml
33+
*.hprof
3134

3235
# node.js
3336
#
@@ -55,5 +58,6 @@ buck-out/
5558
# Bundle artifact
5659
*.jsbundle
5760

58-
# CocoaPods
61+
# Ruby / CocoaPods
5962
/ios/Pods/
63+
/vendor/bundle/

.prettierrc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
2+
arrowParens: 'avoid',
3+
bracketSameLine: true,
24
bracketSpacing: false,
3-
jsxBracketSameLine: true,
45
singleQuote: true,
56
trailingComma: 'all',
6-
arrowParens: 'avoid',
77
};

App/components/Alert.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
import React from "react";
2-
import { View, StyleSheet, Dimensions, Image } from "react-native";
1+
import React from 'react';
2+
import {View, StyleSheet, Dimensions, Image} from 'react-native';
33

4-
const screen = Dimensions.get("window");
4+
const screen = Dimensions.get('window');
55

66
const styles = StyleSheet.create({
77
container: {
8-
position: "absolute",
8+
position: 'absolute',
99
top: 0,
1010
bottom: 0,
1111
left: 0,
1212
right: 0,
1313
flex: 1,
14-
alignItems: "center",
15-
justifyContent: "center"
14+
alignItems: 'center',
15+
justifyContent: 'center',
1616
},
1717
circle: {
18-
backgroundColor: "#ff4136",
18+
backgroundColor: '#ff4136',
1919
width: screen.width / 2,
2020
height: screen.width / 2,
2121
borderRadius: screen.width / 2,
22-
alignItems: "center",
23-
justifyContent: "center"
22+
alignItems: 'center',
23+
justifyContent: 'center',
2424
},
2525
circleCorrect: {
26-
backgroundColor: "#28A125"
26+
backgroundColor: '#28A125',
2727
},
2828
icon: {
29-
width: screen.width / 3
30-
}
29+
width: screen.width / 3,
30+
},
3131
});
3232

33-
export const Alert = ({ correct, visible }) => {
33+
export const Alert = ({correct, visible}) => {
3434
if (!visible) return null;
3535

3636
const icon = correct
37-
? require("../assets/check.png")
38-
: require("../assets/close.png");
37+
? require('../assets/check.png')
38+
: require('../assets/close.png');
3939

4040
const circleStyles = [styles.circle];
4141

App/components/Button.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
import React from "react";
2-
import { View, TouchableOpacity, Text, StyleSheet } from "react-native";
1+
import React from 'react';
2+
import {View, TouchableOpacity, Text, StyleSheet} from 'react-native';
33

44
const styles = StyleSheet.create({
55
button: {
6-
backgroundColor: "rgba(255, 255, 255, 0.3)",
6+
backgroundColor: 'rgba(255, 255, 255, 0.3)',
77
borderRadius: 10,
88
paddingVertical: 15,
9-
alignItems: "center",
10-
justifyContent: "center",
11-
width: "46%",
12-
marginTop: 20
9+
alignItems: 'center',
10+
justifyContent: 'center',
11+
width: '46%',
12+
marginTop: 20,
1313
},
1414
text: {
15-
color: "#fff",
15+
color: '#fff',
1616
fontSize: 20,
17-
textAlign: "center"
17+
textAlign: 'center',
1818
},
1919
buttonContainer: {
20-
flexDirection: "row",
21-
flexWrap: "wrap",
20+
flexDirection: 'row',
21+
flexWrap: 'wrap',
2222
marginTop: 20,
23-
justifyContent: "space-between"
24-
}
23+
justifyContent: 'space-between',
24+
},
2525
});
2626

27-
export const Button = ({ text, onPress = () => {} }) => (
27+
export const Button = ({text, onPress = () => {}}) => (
2828
<TouchableOpacity onPress={onPress} style={styles.button}>
2929
<Text style={styles.text}>{text}</Text>
3030
</TouchableOpacity>
3131
);
3232

33-
export const ButtonContainer = ({ children }) => (
33+
export const ButtonContainer = ({children}) => (
3434
<View style={styles.buttonContainer}>{children}</View>
3535
);

App/components/RowItem.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
import React from "react";
2-
import { View, Text, TouchableOpacity, StyleSheet } from "react-native";
1+
import React from 'react';
2+
import {View, Text, TouchableOpacity, StyleSheet} from 'react-native';
33

44
const styles = StyleSheet.create({
55
row: {
66
paddingHorizontal: 15,
77
paddingVertical: 20,
8-
backgroundColor: "#36B1F0",
9-
marginBottom: 1
8+
backgroundColor: '#36B1F0',
9+
marginBottom: 1,
1010
},
1111
text: {
1212
fontSize: 18,
13-
color: "#fff",
14-
fontWeight: "600"
15-
}
13+
color: '#fff',
14+
fontWeight: '600',
15+
},
1616
});
1717

18-
export const RowItem = ({ onPress = () => {}, name, color }) => (
18+
export const RowItem = ({onPress = () => {}, name, color}) => (
1919
<TouchableOpacity onPress={onPress} activeOpacity={0.8}>
20-
<View style={[styles.row, { backgroundColor: color }]}>
20+
<View style={[styles.row, {backgroundColor: color}]}>
2121
<Text style={styles.text}>{name}</Text>
2222
</View>
2323
</TouchableOpacity>

App/data/computers.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ const questions = [
22
{
33
question: "What is localhost's IP address?",
44
answers: [
5-
{ id: "1", text: "192.168.1.1" },
6-
{ id: "2", text: "127.0.0.1", correct: true },
7-
{ id: "3", text: "209.85.231.104" },
8-
{ id: "4", text: "66.220.149.25" }
9-
]
5+
{id: '1', text: '192.168.1.1'},
6+
{id: '2', text: '127.0.0.1', correct: true},
7+
{id: '3', text: '209.85.231.104'},
8+
{id: '4', text: '66.220.149.25'},
9+
],
1010
},
1111
{
12-
question: "What kind of fruit was used to name a computer in 1984?",
12+
question: 'What kind of fruit was used to name a computer in 1984?',
1313
answers: [
14-
{ id: "1", text: "Blackberry" },
15-
{ id: "2", text: "Blueberry" },
16-
{ id: "3", text: "Pear" },
17-
{ id: "4", text: "Apple", correct: true }
18-
]
19-
}
14+
{id: '1', text: 'Blackberry'},
15+
{id: '2', text: 'Blueberry'},
16+
{id: '3', text: 'Pear'},
17+
{id: '4', text: 'Apple', correct: true},
18+
],
19+
},
2020
];
2121

2222
export default questions;

0 commit comments

Comments
 (0)