Skip to content
This repository was archived by the owner on Sep 28, 2023. It is now read-only.

Commit 522265d

Browse files
committed
Import the F8 2017 app
1 parent 3e5a0c8 commit 522265d

File tree

839 files changed

+27939
-15992
lines changed

Some content is hidden

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

839 files changed

+27939
-15992
lines changed

.atom-build.json

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

.babelrc

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
{
2-
"passPerPreset": true,
3-
"presets": [
4-
{
5-
"plugins": [
6-
"./server/schema/babelRelayPlugin"
7-
]
8-
},
9-
"react-native"
10-
]
2+
"plugins": ["relay"],
3+
"presets": ["react-native"]
114
}

.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

.circleci/config.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
version: 2
2+
jobs:
3+
build:
4+
working_directory: ~/f8app
5+
docker:
6+
- image: circleci/node:7.10
7+
steps:
8+
- checkout
9+
- restore_cache:
10+
keys:
11+
- v1-dependencies-{{ checksum "package.json" }}
12+
# fallback to using the latest cache if no exact match is found
13+
- v1-dependencies-
14+
- run: yarn install
15+
- save_cache:
16+
paths:
17+
- node_modules
18+
key: v1-dependencies-{{ checksum "package.json" }}
19+
- run: yarn lint
20+
- run: yarn flow
21+
- run: yarn test
22+

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/node_modules/**

.eslintrc

Lines changed: 57 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,72 +11,94 @@
1111
},
1212

1313
"plugins": [
14-
"react"
14+
"react",
15+
"prettier",
1516
],
1617

1718
// Map from global var to bool specifying if it can be redefined
1819
"globals": {
19-
"__BUNDLE_START_TIME__": false,
2020
"__DEV__": true,
2121
"__dirname": false,
22-
"__filename": false,
2322
"__fbBatchedBridgeConfig": false,
2423
"alert": false,
2524
"cancelAnimationFrame": false,
25+
"cancelIdleCallback": false,
2626
"clearImmediate": true,
2727
"clearInterval": false,
2828
"clearTimeout": false,
2929
"console": false,
3030
"document": false,
3131
"escape": false,
32+
"Event": false,
33+
"EventTarget": false,
3234
"exports": false,
35+
"fetch": false,
36+
"FormData": false,
3337
"global": false,
3438
"jest": false,
35-
"pit": false,
3639
"Map": true,
3740
"module": false,
3841
"navigator": false,
3942
"process": false,
40-
"Promise": false,
43+
"Promise": true,
4144
"requestAnimationFrame": true,
45+
"requestIdleCallback": true,
4246
"require": false,
4347
"Set": true,
4448
"setImmediate": true,
4549
"setInterval": false,
4650
"setTimeout": false,
4751
"window": false,
48-
"FormData": true,
4952
"XMLHttpRequest": false,
53+
"pit": false,
5054

51-
// Flow "known-globals" annotations:
52-
"ReactElement": false,
55+
// Flow global types.
56+
"ReactComponent": false,
5357
"ReactClass": false,
54-
"Class": false
58+
"ReactElement": false,
59+
"ReactPropsCheckType": false,
60+
"ReactPropsChainableTypeChecker": false,
61+
"ReactPropTypes": false,
62+
"SyntheticEvent": false,
63+
"$Either": false,
64+
"$All": false,
65+
"$ArrayBufferView": false,
66+
"$Tuple": false,
67+
"$Supertype": false,
68+
"$Subtype": false,
69+
"$Shape": false,
70+
"$Diff": false,
71+
"$Keys": false,
72+
"$Enum": false,
73+
"$Exports": false,
74+
"$FlowIssue": false,
75+
"$FlowFixMe": false,
76+
"$FixMe": false
5577
},
5678

5779
"rules": {
58-
"comma-dangle": 0, // disallow trailing commas in object literals
80+
"comma-dangle": 0, // disallow trailing commas in object literals
5981
"no-cond-assign": 1, // disallow assignment in conditional expressions
6082
"no-console": 0, // disallow use of console (off by default in the node environment)
83+
"no-const-assign": 2, // disallow assignment to const-declared variables
6184
"no-constant-condition": 0, // disallow use of constant expressions in conditions
6285
"no-control-regex": 1, // disallow control characters in regular expressions
6386
"no-debugger": 1, // disallow use of debugger
64-
"no-dupe-keys": 2, // disallow duplicate keys when creating object literals
87+
"no-dupe-keys": 1, // disallow duplicate keys when creating object literals
6588
"no-empty": 0, // disallow empty statements
66-
"no-empty-character-class": 1, // disallow the use of empty character classes in regular expressions
6789
"no-ex-assign": 1, // disallow assigning to the exception in a catch block
6890
"no-extra-boolean-cast": 1, // disallow double-negation boolean casts in a boolean context
6991
"no-extra-parens": 0, // disallow unnecessary parentheses (off by default)
7092
"no-extra-semi": 1, // disallow unnecessary semicolons
71-
"no-func-assign": 0, // disallow overwriting functions written as function declarations
93+
"no-func-assign": 1, // disallow overwriting functions written as function declarations
7294
"no-inner-declarations": 0, // disallow function or variable declarations in nested blocks
7395
"no-invalid-regexp": 1, // disallow invalid regular expression strings in the RegExp constructor
7496
"no-negated-in-lhs": 1, // disallow negation of the left operand of an in expression
7597
"no-obj-calls": 1, // disallow the use of object properties of the global object (Math and JSON) as functions
7698
"no-regex-spaces": 1, // disallow multiple spaces in a regular expression literal
7799
"no-reserved-keys": 0, // disallow reserved words being used as object literal keys (off by default)
78100
"no-sparse-arrays": 1, // disallow sparse arrays
79-
"no-unreachable": 2, // disallow unreachable statements after a return, throw, continue, or break statement
101+
"no-unreachable": 1, // disallow unreachable statements after a return, throw, continue, or break statement
80102
"use-isnan": 1, // disallow comparisons with the value NaN
81103
"valid-jsdoc": 0, // Ensure JSDoc comments are valid (off by default)
82104
"valid-typeof": 1, // Ensure that the results of typeof are compared against a valid string
@@ -89,10 +111,10 @@
89111
"consistent-return": 0, // require return statements to either always or never specify values
90112
"curly": 1, // specify curly brace conventions for all control statements
91113
"default-case": 0, // require default case in switch statements (off by default)
92-
"dot-notation": 0, // encourages use of dot notation whenever possible
93-
"eqeqeq": 1, // require the use of === and !==
114+
"dot-notation": 1, // encourages use of dot notation whenever possible
115+
"eqeqeq": [1, "allow-null"], // require the use of === and !==
94116
"guard-for-in": 0, // make sure for-in loops have an if statement (off by default)
95-
"no-alert": 0, // disallow the use of alert, confirm, and prompt
117+
"no-alert": 1, // disallow the use of alert, confirm, and prompt
96118
"no-caller": 1, // disallow use of arguments.caller or arguments.callee
97119
"no-div-regex": 1, // disallow division operators explicitly at beginning of regular expression (off by default)
98120
"no-else-return": 0, // disallow else after a return in an if (off by default)
@@ -130,11 +152,6 @@
130152
"wrap-iife": 0, // require immediate function invocation to be wrapped in parentheses (off by default)
131153
"yoda": 1, // require or disallow Yoda conditions
132154

133-
// Strict Mode
134-
// These rules relate to using strict mode.
135-
136-
// "strict": [2, "global"], // require or disallow the "use strict" pragma in the global scope (off by default in the node environment)
137-
138155
// Variables
139156
// These rules have to do with variable declarations.
140157

@@ -143,7 +160,7 @@
143160
"no-label-var": 1, // disallow labels that share a name with a variable
144161
"no-shadow": 1, // disallow declaration of variables already declared in the outer scope
145162
"no-shadow-restricted-names": 1, // disallow shadowing of names such as arguments
146-
"no-undef": 2, // disallow use of undeclared variables unless mentioned in a /*global */ block.
163+
"no-undef": 2, // disallow use of undeclared variables unless mentioned in a /*global */ block
147164
"no-undefined": 0, // disallow use of undefined variable (off by default)
148165
"no-undef-init": 1, // disallow use of undefined when initializing variables
149166
"no-unused-vars": [1, {"vars": "all", "args": "none"}], // disallow declaration of variables that are not used in the code
@@ -164,11 +181,13 @@
164181
// These rules are purely matters of style and are quite subjective.
165182

166183
"key-spacing": 0,
184+
"keyword-spacing": 1, // enforce spacing before and after keywords
185+
"jsx-quotes": [1, "prefer-double"],
167186
"comma-spacing": 0,
168187
"no-multi-spaces": 0,
169188
"brace-style": 0, // enforce one true brace style (off by default)
170189
"camelcase": 0, // require camel case names
171-
"consistent-this": 1, // enforces consistent naming when capturing the current execution context (off by default)
190+
"consistent-this": [1, "self"], // enforces consistent naming when capturing the current execution context (off by default)
172191
"eol-last": 1, // enforce newline at the end of file, with no multiple empty lines
173192
"func-names": 0, // require function expressions to have a name (off by default)
174193
"func-style": 0, // enforces use of function declarations or expressions (off by default)
@@ -183,11 +202,10 @@
183202
"no-trailing-spaces": 1, // disallow trailing whitespace at the end of lines
184203
"no-underscore-dangle": 0, // disallow dangling underscores in identifiers
185204
"no-mixed-spaces-and-tabs": 1, // disallow mixed spaces and tabs for indentation
186-
"quotes": [1, "single", "avoid-escape"], // specify whether double or single quotes should be used
205+
"quotes": [1, "double", "avoid-escape"], // specify whether double or single quotes should be used
187206
"quote-props": 0, // require quotes around object literal property names (off by default)
188207
"semi": 1, // require or disallow use of semicolons instead of ASI
189208
"sort-vars": 0, // sort variables within the same declaration block (off by default)
190-
"keyword-spacing": [1, { "before": true, "after": true }], // require a space after certain keywords (off by default)
191209
"space-in-brackets": 0, // require or disallow spaces inside brackets (off by default)
192210
"space-in-parens": 0, // require or disallow spaces inside parentheses (off by default)
193211
"space-infix-ops": 1, // require spaces around operators
@@ -206,20 +224,28 @@
206224
"no-bitwise": 1, // disallow use of bitwise operators (off by default)
207225
"no-plusplus": 0, // disallow use of unary operators, ++ and -- (off by default)
208226

227+
// React Plugin
228+
// The following rules are made available via `eslint-plugin-react`.
229+
209230
"react/display-name": 0,
210231
"react/jsx-boolean-value": 0,
211-
"jsx-quotes": [1, "prefer-double"],
232+
"react/jsx-no-duplicate-props": 2,
233+
"react/jsx-no-undef": 1,
212234
"react/jsx-sort-props": 0,
213235
"react/jsx-uses-react": 1,
214236
"react/jsx-uses-vars": 1,
215-
"react/no-did-mount-set-state": [1, "allow-in-func"],
216-
"react/no-did-update-set-state": [1, "allow-in-func"],
237+
"react/no-did-mount-set-state": 1,
238+
"react/no-did-update-set-state": 1,
217239
"react/no-multi-comp": 0,
240+
"react/no-string-refs": 1,
218241
"react/no-unknown-property": 0,
219242
"react/prop-types": 0,
220-
"react/react-in-jsx-scope": 0,
243+
"react/react-in-jsx-scope": 1,
221244
"react/self-closing-comp": 1,
222245
"react/wrap-multilines": 0,
223-
"react/jsx-no-undef": 2
246+
247+
// Prettier Plugin
248+
// The following rules are made available via `eslint-plugin-prettier`.
249+
"prettier/prettier": "error",
224250
}
225251
}

.flowconfig

Lines changed: 30 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,53 @@
11
[ignore]
2-
3-
# We fork some components by platform.
4-
.*/*.web.js
5-
.*/*.android.js
6-
7-
# Ignore templates with `@flow` in header
8-
.*/local-cli/generator.*
9-
10-
# Some modules have their own node_modules with overlap
11-
.*/node_modules/node-haste/.*
12-
13-
# Ugh
14-
.*/node_modules/babel.*
15-
.*/node_modules/babylon.*
16-
.*/node_modules/invariant.*
17-
18-
# Ignore react and fbjs where there are overlaps, but don't ignore
19-
# anything that react-native relies on
20-
.*/node_modules/fbjs/lib/Map.js
21-
.*/node_modules/fbjs/lib/Promise.js
22-
.*/node_modules/fbjs/lib/isEmpty.js
23-
.*/node_modules/fbjs/lib/crc32.js
24-
.*/node_modules/fbjs/lib/ErrorUtils.js
25-
26-
# Flow has a built-in definition for the 'react' module which we prefer to use
27-
# over the currently-untyped source
28-
.*/node_modules/react/react.js
29-
.*/node_modules/react/lib/React.js
30-
.*/node_modules/react/lib/ReactDOM.js
31-
32-
# Ignore commoner tests
33-
.*/node_modules/commoner/test/.*
34-
35-
# See https://github.com/facebook/flow/issues/442
36-
.*/react-tools/node_modules/commoner/lib/reader.js
37-
38-
# Ignore jest
39-
.*/node_modules/jest-cli/.*
40-
41-
.*/node_modules/react-native-push-notification/.*
42-
43-
.*/node_modules/is-my-json-valid/test/.*\.json
44-
.*/node_modules/iconv-lite/encodings/tables/.*\.json
45-
.*/node_modules/y18n/test/.*\.json
46-
.*/node_modules/spdx-license-ids/spdx-license-ids.json
47-
.*/node_modules/spdx-exceptions/index.json
48-
.*/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json
49-
.*/node_modules/resolve/lib/core.json
50-
.*/node_modules/jsonparse/samplejson/.*\.json
51-
.*/node_modules/json5/test/.*\.json
52-
.*/node_modules/ua-parser-js/test/.*\.json
53-
.*/node_modules/builtin-modules/builtin-modules.json
54-
.*/node_modules/binary-extensions/binary-extensions.json
55-
.*/node_modules/url-regex/tlds.json
56-
.*/node_modules/joi/.*\.json
57-
.*/node_modules/isemail/.*\.json
58-
.*/node_modules/tr46/.*\.json
59-
.*/node_modules/jmespath/.*\.json
60-
.*/node_modules/fbjs-scripts/node_modules/js-tokens/test/fixtures/.*\.json
61-
.*/node_modules/protobufjs/src/.*\.json
62-
63-
# Ignore Website
64-
.*/website/.*
65-
.*/cloud/.*
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore "BUCK" generated dirs
6+
<PROJECT_ROOT>/\.buckd/
7+
8+
; Ignore unexpected extra "@providesModule"
9+
.*/node_modules/.*/node_modules/fbjs/.*
10+
11+
; Ignore unrelated errors in node_modules
12+
.*/react-native/Libraries/.*
13+
.*/react-native/lib/.*
14+
.*/babel-plugin-relay/lib/.*
15+
.*/react-relay/lib/.*
16+
.*/relay-compiler/lib/.*
17+
.*/relay-runtime/lib/.*
18+
.*/graphql/.*
19+
.*/react-native-keyboard-aware-scroll-view/.*
20+
.*/react-native-linear-gradient/.*
21+
.*/react-native-deprecated-custom-components/src/flattenStyle.js
6622

6723
[include]
6824

6925
[libs]
7026
node_modules/react-native/Libraries/react-native/react-native-interface.js
7127
node_modules/react-native/flow/
28+
flow/
7229
js/flow-lib.js
7330

7431
[options]
32+
emoji=true
33+
7534
module.system=haste
7635

77-
esproposal.class_static_fields=enable
78-
esproposal.class_instance_fields=enable
36+
experimental.strict_type_args=true
7937

8038
munge_underscores=true
8139

82-
module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub'
83-
module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub'
40+
module.name_mapper.extension='\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
8441

8542
suppress_type=$FlowIssue
8643
suppress_type=$FlowFixMe
8744
suppress_type=$FixMe
8845

89-
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-0]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
90-
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-0]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
46+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-8]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
47+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-8]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
9148
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
9249

50+
unsafe.enable_getters_and_setters=true
51+
9352
[version]
94-
^0.25.0
53+
^0.42.0

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pbxproj -text

.github/[email protected]

-577 KB
Loading

.github/[email protected]

-456 KB
Binary file not shown.

0 commit comments

Comments
 (0)