Bläddra i källkod

flow 0.36.0

The first step towards enabling Facbook's flow in the project. The flow
configuration is pristine as generated by react-native upgrade.
j8
Lyubomir Marinov 8 år sedan
förälder
incheckning
63fd263890
3 ändrade filer med 50 tillägg och 0 borttagningar
  1. 44
    0
      .flowconfig
  2. 2
    0
      package.json
  3. 4
    0
      webpack.config.js

+ 44
- 0
.flowconfig Visa fil

@@ -0,0 +1,44 @@
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 unexpected extra "@providesModule"
9
+.*/node_modules/.*/node_modules/fbjs/.*
10
+
11
+; Ignore duplicate module providers
12
+; For RN Apps installed via npm, "Libraries" folder is inside
13
+; "node_modules/react-native" but in the source repo it is in the root
14
+.*/Libraries/react-native/React.js
15
+.*/Libraries/react-native/ReactNative.js
16
+
17
+[include]
18
+
19
+[libs]
20
+node_modules/react-native/Libraries/react-native/react-native-interface.js
21
+node_modules/react-native/flow
22
+flow/
23
+
24
+[options]
25
+module.system=haste
26
+
27
+experimental.strict_type_args=true
28
+
29
+munge_underscores=true
30
+
31
+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\)$' -> 'RelativeImageStub'
32
+
33
+suppress_type=$FlowIssue
34
+suppress_type=$FlowFixMe
35
+suppress_type=$FixMe
36
+
37
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-6]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
38
+suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-6]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
39
+suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
40
+
41
+unsafe.enable_getters_and_setters=true
42
+
43
+[version]
44
+^0.36.0

+ 2
- 0
package.json Visa fil

@@ -53,6 +53,7 @@
53 53
     "babel-core": "^6.18.0",
54 54
     "babel-eslint": "^7.1.1",
55 55
     "babel-loader": "^6.2.10",
56
+    "babel-plugin-transform-flow-strip-types": "^6.18.0",
56 57
     "babel-polyfill": "*",
57 58
     "babel-preset-es2015": "^6.18.0",
58 59
     "babel-preset-react": "^6.16.0",
@@ -65,6 +66,7 @@
65 66
     "eslint-plugin-react-native": "^2.2.1",
66 67
     "expose-loader": "*",
67 68
     "file-loader": "*",
69
+    "flow-bin": "^0.36.0",
68 70
     "haste-resolver-webpack-plugin": "^0.2.2",
69 71
     "imports-loader": "*",
70 72
     "jshint": "2.9.4",

+ 4
- 0
webpack.config.js Visa fil

@@ -58,6 +58,10 @@ var config = {
58 58
             exclude: node_modules,
59 59
             loader: 'babel',
60 60
             query: {
61
+                plugins: [
62
+                    'transform-flow-strip-types'
63
+                ],
64
+
61 65
                 // XXX The require.resolve bellow solves failures to locate the
62 66
                 // presets when lib-jitsi-meet, for example, is npm linked in
63 67
                 // jitsi-meet. The require.resolve, of course, mandates the use

Laddar…
Avbryt
Spara