Skip to content

Commit 122cc0f

Browse files
committed
initial config
0 parents  commit 122cc0f

Some content is hidden

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

63 files changed

+9581
-0
lines changed

.buckconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
[android]
3+
target = Google Inc.:Google APIs:23
4+
5+
[maven_repositories]
6+
central = https://repo1.maven.org/maven2

.eslintrc.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
root: true,
3+
extends: '@react-native-community',
4+
};

.flowconfig

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore "BUCK" generated dirs
6+
<PROJECT_ROOT>/\.buckd/
7+
8+
; Ignore polyfills
9+
node_modules/react-native/Libraries/polyfills/.*
10+
11+
; Flow doesn't support platforms
12+
.*/Libraries/Utilities/LoadingView.js
13+
14+
[untyped]
15+
.*/node_modules/@react-native-community/cli/.*/.*
16+
17+
[include]
18+
19+
[libs]
20+
node_modules/react-native/interface.js
21+
node_modules/react-native/flow/
22+
23+
[options]
24+
emoji=true
25+
26+
exact_by_default=true
27+
28+
format.bracket_spacing=false
29+
30+
module.file_ext=.js
31+
module.file_ext=.json
32+
module.file_ext=.ios.js
33+
34+
munge_underscores=true
35+
36+
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
37+
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'
38+
39+
suppress_type=$FlowIssue
40+
suppress_type=$FlowFixMe
41+
suppress_type=$FlowFixMeProps
42+
suppress_type=$FlowFixMeState
43+
44+
[lints]
45+
sketchy-null-number=warn
46+
sketchy-null-mixed=warn
47+
sketchy-number=warn
48+
untyped-type-import=warn
49+
nonstrict-import=warn
50+
deprecated-type=warn
51+
unsafe-getters-setters=warn
52+
unnecessary-invariant=warn
53+
signature-verification-failure=warn
54+
55+
[strict]
56+
deprecated-type
57+
nonstrict-import
58+
sketchy-null
59+
unclear-type
60+
unsafe-getters-setters
61+
untyped-import
62+
untyped-type-import
63+
64+
[version]
65+
^0.158.0

.gitattributes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Windows files should use crlf line endings
2+
# https://help.github.com/articles/dealing-with-line-endings/
3+
*.bat text eol=crlf

.gitignore

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# OSX
2+
#
3+
.DS_Store
4+
5+
# Xcode
6+
#
7+
build/
8+
*.pbxuser
9+
!default.pbxuser
10+
*.mode1v3
11+
!default.mode1v3
12+
*.mode2v3
13+
!default.mode2v3
14+
*.perspectivev3
15+
!default.perspectivev3
16+
xcuserdata
17+
*.xccheckout
18+
*.moved-aside
19+
DerivedData
20+
*.hmap
21+
*.ipa
22+
*.xcuserstate
23+
24+
# Android/IntelliJ
25+
#
26+
build/
27+
.idea
28+
.gradle
29+
local.properties
30+
*.iml
31+
*.hprof
32+
33+
# node.js
34+
#
35+
node_modules/
36+
npm-debug.log
37+
yarn-error.log
38+
39+
# BUCK
40+
buck-out/
41+
\.buckd/
42+
*.keystore
43+
!debug.keystore
44+
45+
# fastlane
46+
#
47+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48+
# screenshots whenever they are needed.
49+
# For more information about the recommended setup visit:
50+
# https://docs.fastlane.tools/best-practices/source-control/
51+
52+
*/fastlane/report.xml
53+
*/fastlane/Preview.html
54+
*/fastlane/screenshots
55+
56+
# Bundle artifact
57+
*.jsbundle
58+
59+
# CocoaPods
60+
/ios/Pods/

.prettierrc.js

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

.watchmanconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

App.js

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/**
2+
* Sample React Native App
3+
* https://github.com/facebook/react-native
4+
*
5+
* @format
6+
* @flow strict-local
7+
*/
8+
9+
import React from 'react';
10+
import type {Node} from 'react';
11+
import {
12+
SafeAreaView,
13+
ScrollView,
14+
StatusBar,
15+
StyleSheet,
16+
Text,
17+
useColorScheme,
18+
View,
19+
} from 'react-native';
20+
21+
import {
22+
Colors,
23+
DebugInstructions,
24+
Header,
25+
LearnMoreLinks,
26+
ReloadInstructions,
27+
} from 'react-native/Libraries/NewAppScreen';
28+
29+
const Section = ({children, title}): Node => {
30+
const isDarkMode = useColorScheme() === 'dark';
31+
return (
32+
<View style={styles.sectionContainer}>
33+
<Text
34+
style={[
35+
styles.sectionTitle,
36+
{
37+
color: isDarkMode ? Colors.white : Colors.black,
38+
},
39+
]}>
40+
{title}
41+
</Text>
42+
<Text
43+
style={[
44+
styles.sectionDescription,
45+
{
46+
color: isDarkMode ? Colors.light : Colors.dark,
47+
},
48+
]}>
49+
{children}
50+
</Text>
51+
</View>
52+
);
53+
};
54+
55+
const App: () => Node = () => {
56+
const isDarkMode = useColorScheme() === 'dark';
57+
58+
const backgroundStyle = {
59+
backgroundColor: isDarkMode ? Colors.darker : Colors.lighter,
60+
};
61+
62+
return (
63+
<SafeAreaView style={backgroundStyle}>
64+
<StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} />
65+
<ScrollView
66+
contentInsetAdjustmentBehavior="automatic"
67+
style={backgroundStyle}>
68+
<Header />
69+
<View
70+
style={{
71+
backgroundColor: isDarkMode ? Colors.black : Colors.white,
72+
}}>
73+
<Section title="Step One">
74+
Edit <Text style={styles.highlight}>App.js</Text> to change this
75+
screen and then come back to see your edits.
76+
</Section>
77+
<Section title="See Your Changes">
78+
<ReloadInstructions />
79+
</Section>
80+
<Section title="Debug">
81+
<DebugInstructions />
82+
</Section>
83+
<Section title="Learn More">
84+
Read the docs to discover what to do next:
85+
</Section>
86+
<LearnMoreLinks />
87+
</View>
88+
</ScrollView>
89+
</SafeAreaView>
90+
);
91+
};
92+
93+
const styles = StyleSheet.create({
94+
sectionContainer: {
95+
marginTop: 32,
96+
paddingHorizontal: 24,
97+
},
98+
sectionTitle: {
99+
fontSize: 24,
100+
fontWeight: '600',
101+
},
102+
sectionDescription: {
103+
marginTop: 8,
104+
fontSize: 18,
105+
fontWeight: '400',
106+
},
107+
highlight: {
108+
fontWeight: '700',
109+
},
110+
});
111+
112+
export default App;

__tests__/App-test.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/**
2+
* @format
3+
*/
4+
5+
import 'react-native';
6+
import React from 'react';
7+
import App from '../App';
8+
9+
// Note: test renderer must be required after react-native.
10+
import renderer from 'react-test-renderer';
11+
12+
it('renders correctly', () => {
13+
renderer.create(<App />);
14+
});

_editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Windows files
2+
[*.bat]
3+
end_of_line = crlf

0 commit comments

Comments
 (0)