Browse Source

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 years ago
parent
commit
63fd263890
3 changed files with 50 additions and 0 deletions
  1. 44
    0
      .flowconfig
  2. 2
    0
      package.json
  3. 4
    0
      webpack.config.js

+ 44
- 0
.flowconfig View File

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 View File

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

+ 4
- 0
webpack.config.js View File

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

Loading…
Cancel
Save