Skip to content

Commit 1200b4e

Browse files
authored
Merge pull request #472 from sbugert/update
update example app using latest "react-native init" (0.60.5)
2 parents e21fdb7 + dc2f6f8 commit 1200b4e

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

+6042
-3809
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ root = true
33

44
[*]
55
indent_style = space
6-
indent_size = 4
6+
indent_size = 2
77
end_of_line = lf
88
charset = utf-8
99
trim_trailing_whitespace = true
@@ -12,5 +12,5 @@ insert_final_newline = true
1212
[*.md]
1313
trim_trailing_whitespace = false
1414

15-
[*.js]
15+
[*.{js,json}]
1616
indent_size = 2

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"es6": true,
44
"node": true
55
},
6-
"extends": ["eslint:recommended", "plugin:react/recommended"],
6+
"extends": ["plugin:prettier/recommended", "plugin:react/recommended"],
77
"parser": "babel-eslint",
88
"parserOptions": {
99
"ecmaVersion": 6

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Carthage/Build
4747

4848
# fastlane
4949
#
50-
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
50+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
5151
# screenshots whenever they are needed.
5252
# For more information about the recommended setup visit:
5353
# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md
@@ -70,3 +70,4 @@ Example/android/app/app.iml
7070
Example/.buckconfig
7171
Example/.vscode/
7272
Example/android/app/BUCK
73+
/yarn.lock

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"singleQuote": true,
3+
"trailingComma": "es5",
4+
"proseWrap": "always",
5+
"arrowParens": "always"
6+
}

.watchmanconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"ignore_dirs": ["Example", "node_modules"]
3+
}

Example/.babelrc

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

Example/.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+
};

Example/.flowconfig

Lines changed: 59 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,20 @@
1111
; Ignore duplicate module providers
1212
; For RN Apps installed via npm, "Libraries" folder is inside
1313
; "node_modules/react-native" but in the source repo it is in the root
14-
.*/Libraries/react-native/React.js
14+
node_modules/react-native/Libraries/react-native/React.js
1515

1616
; Ignore polyfills
17-
.*/Libraries/polyfills/.*
17+
node_modules/react-native/Libraries/polyfills/.*
18+
19+
; These should not be required directly
20+
; require from fbjs/lib instead: require('fbjs/lib/warning')
21+
node_modules/warning/.*
22+
23+
; Flow doesn't support platforms
24+
.*/Libraries/Utilities/HMRLoadingView.js
25+
26+
[untyped]
27+
.*/node_modules/@react-native-community/cli/.*/.*
1828

1929
[include]
2030

@@ -25,7 +35,30 @@ node_modules/react-native/flow/
2535
[options]
2636
emoji=true
2737

38+
esproposal.optional_chaining=enable
39+
esproposal.nullish_coalescing=enable
40+
41+
module.file_ext=.js
42+
module.file_ext=.json
43+
module.file_ext=.ios.js
44+
2845
module.system=haste
46+
module.system.haste.use_name_reducers=true
47+
# get basename
48+
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
49+
# strip .js or .js.flow suffix
50+
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
51+
# strip .ios suffix
52+
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
53+
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
54+
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
55+
module.system.haste.paths.blacklist=.*/__tests__/.*
56+
module.system.haste.paths.blacklist=.*/__mocks__/.*
57+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
58+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
59+
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
60+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
61+
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
2962

3063
munge_underscores=true
3164

@@ -35,14 +68,32 @@ suppress_type=$FlowIssue
3568
suppress_type=$FlowFixMe
3669
suppress_type=$FlowFixMeProps
3770
suppress_type=$FlowFixMeState
38-
suppress_type=$FixMe
3971

40-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
41-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-7]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
42-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
72+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
73+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
4374
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
4475

45-
unsafe.enable_getters_and_setters=true
76+
[lints]
77+
sketchy-null-number=warn
78+
sketchy-null-mixed=warn
79+
sketchy-number=warn
80+
untyped-type-import=warn
81+
nonstrict-import=warn
82+
deprecated-type=warn
83+
unsafe-getters-setters=warn
84+
inexact-spread=warn
85+
unnecessary-invariant=warn
86+
signature-verification-failure=warn
87+
deprecated-utility=error
88+
89+
[strict]
90+
deprecated-type
91+
nonstrict-import
92+
sketchy-null
93+
unclear-type
94+
unsafe-getters-setters
95+
untyped-import
96+
untyped-type-import
4697

4798
[version]
48-
^0.57.0
99+
^0.98.0

Example/.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ DerivedData
2121
*.ipa
2222
*.xcuserstate
2323
project.xcworkspace
24-
ios/GoogleMobileAds.framework/
2524

2625
# Android/IntelliJ
2726
#
@@ -52,3 +51,9 @@ buck-out/
5251
*/fastlane/report.xml
5352
*/fastlane/Preview.html
5453
*/fastlane/screenshots
54+
55+
# Bundle artifact
56+
*.jsbundle
57+
58+
# CocoaPods
59+
/ios/Pods/

Example/.prettierrc.js

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

0 commit comments

Comments
 (0)