Skip to content

Commit c6a6f07

Browse files
authored
Update App.tsx (#211)
Remove 1 space indent for non-empty lines that fails linter in App.tsx. Fixes #201
1 parent 353eb0c commit c6a6f07

File tree

1 file changed

+98
-98
lines changed

1 file changed

+98
-98
lines changed

template/App.tsx

Lines changed: 98 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -8,108 +8,108 @@
88
* @format
99
*/
1010

11-
import React from 'react';
12-
import {
13-
SafeAreaView,
14-
ScrollView,
15-
StatusBar,
16-
StyleSheet,
17-
Text,
18-
useColorScheme,
19-
View,
20-
} from 'react-native';
11+
import React from 'react';
12+
import {
13+
SafeAreaView,
14+
ScrollView,
15+
StatusBar,
16+
StyleSheet,
17+
Text,
18+
useColorScheme,
19+
View,
20+
} from 'react-native';
2121

22-
import {
23-
Colors,
24-
DebugInstructions,
25-
Header,
26-
LearnMoreLinks,
27-
ReloadInstructions,
28-
} from 'react-native/Libraries/NewAppScreen';
22+
import {
23+
Colors,
24+
DebugInstructions,
25+
Header,
26+
LearnMoreLinks,
27+
ReloadInstructions,
28+
} from 'react-native/Libraries/NewAppScreen';
2929

30-
const Section: React.FC<{
31-
title: string;
32-
}> = ({children, title}) => {
33-
const isDarkMode = useColorScheme() === 'dark';
34-
return (
35-
<View style={styles.sectionContainer}>
36-
<Text
37-
style={[
38-
styles.sectionTitle,
39-
{
40-
color: isDarkMode ? Colors.white : Colors.black,
41-
},
42-
]}>
43-
{title}
44-
</Text>
45-
<Text
46-
style={[
47-
styles.sectionDescription,
48-
{
49-
color: isDarkMode ? Colors.light : Colors.dark,
50-
},
51-
]}>
52-
{children}
53-
</Text>
54-
</View>
55-
);
56-
};
30+
const Section: React.FC<{
31+
title: string;
32+
}> = ({children, title}) => {
33+
const isDarkMode = useColorScheme() === 'dark';
34+
return (
35+
<View style={styles.sectionContainer}>
36+
<Text
37+
style={[
38+
styles.sectionTitle,
39+
{
40+
color: isDarkMode ? Colors.white : Colors.black,
41+
},
42+
]}>
43+
{title}
44+
</Text>
45+
<Text
46+
style={[
47+
styles.sectionDescription,
48+
{
49+
color: isDarkMode ? Colors.light : Colors.dark,
50+
},
51+
]}>
52+
{children}
53+
</Text>
54+
</View>
55+
);
56+
};
5757

58-
const App = () => {
59-
const isDarkMode = useColorScheme() === 'dark';
58+
const App = () => {
59+
const isDarkMode = useColorScheme() === 'dark';
6060

61-
const backgroundStyle = {
62-
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
63-
};
61+
const backgroundStyle = {
62+
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
63+
};
6464

65-
return (
66-
<SafeAreaView style={backgroundStyle}>
67-
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
68-
<ScrollView
69-
contentInsetAdjustmentBehavior="automatic"
70-
style={backgroundStyle}>
71-
<Header />
72-
<View
73-
style={{
74-
backgroundColor: isDarkMode ? Colors.black : Colors.white,
75-
}}>
76-
<Section title="Step One">
77-
Edit <Text style={styles.highlight}>App.js</Text> to change this
78-
screen and then come back to see your edits.
79-
</Section>
80-
<Section title="See Your Changes">
81-
<ReloadInstructions />
82-
</Section>
83-
<Section title="Debug">
84-
<DebugInstructions />
85-
</Section>
86-
<Section title="Learn More">
87-
Read the docs to discover what to do next:
88-
</Section>
89-
<LearnMoreLinks />
90-
</View>
91-
</ScrollView>
92-
</SafeAreaView>
93-
);
94-
};
65+
return (
66+
<SafeAreaView style={backgroundStyle}>
67+
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
68+
<ScrollView
69+
contentInsetAdjustmentBehavior="automatic"
70+
style={backgroundStyle}>
71+
<Header />
72+
<View
73+
style={{
74+
backgroundColor: isDarkMode ? Colors.black : Colors.white,
75+
}}>
76+
<Section title="Step One">
77+
Edit <Text style={styles.highlight}>App.js</Text> to change this
78+
screen and then come back to see your edits.
79+
</Section>
80+
<Section title="See Your Changes">
81+
<ReloadInstructions />
82+
</Section>
83+
<Section title="Debug">
84+
<DebugInstructions />
85+
</Section>
86+
<Section title="Learn More">
87+
Read the docs to discover what to do next:
88+
</Section>
89+
<LearnMoreLinks />
90+
</View>
91+
</ScrollView>
92+
</SafeAreaView>
93+
);
94+
};
9595

96-
const styles = StyleSheet.create({
97-
sectionContainer: {
98-
marginTop: 32,
99-
paddingHorizontal: 24,
100-
},
101-
sectionTitle: {
102-
fontSize: 24,
103-
fontWeight: '600',
104-
},
105-
sectionDescription: {
106-
marginTop: 8,
107-
fontSize: 18,
108-
fontWeight: '400',
109-
},
110-
highlight: {
111-
fontWeight: '700',
112-
},
113-
});
96+
const styles = StyleSheet.create({
97+
sectionContainer: {
98+
marginTop: 32,
99+
paddingHorizontal: 24,
100+
},
101+
sectionTitle: {
102+
fontSize: 24,
103+
fontWeight: '600',
104+
},
105+
sectionDescription: {
106+
marginTop: 8,
107+
fontSize: 18,
108+
fontWeight: '400',
109+
},
110+
highlight: {
111+
fontWeight: '700',
112+
},
113+
});
114114

115-
export default App;
115+
export default App;

0 commit comments

Comments
 (0)