Thibault Malbranche 5 years ago
parent
commit
2e4cb88132
17 changed files with 2323 additions and 189 deletions
  1. 31
    24
      .eslintrc.js
  2. 0
    2
      .prettierrc.js
  3. 17
    4
      .vscode/settings.json
  4. 1
    0
      .yarnrc
  5. 4
    1
      index.js
  6. 2
    0
      js/WebViewTypes.js
  7. 10
    6
      package.json
  8. 21
    21
      src/WebView.android.tsx
  9. 18
    20
      src/WebView.ios.tsx
  10. 3
    4
      src/WebViewShared.ts
  11. 2
    2
      src/index.ts
  12. 4
    0
      src/test.ts
  13. 12
    0
      src/test.tsx
  14. 2
    2
      src/types/WebViewTypes.ts
  15. 3
    2
      src/utils.ts
  16. 5
    14
      tsconfig.json
  17. 2188
    87
      yarn.lock

+ 31
- 24
.eslintrc.js View File

1
 module.exports = {
1
 module.exports = {
2
   // Airbnb is the base, prettier is here so that eslint doesn't conflict with prettier
2
   // Airbnb is the base, prettier is here so that eslint doesn't conflict with prettier
3
-  extends: ['airbnb', 'prettier'],
4
-  parser: 'babel-eslint',
5
-  plugins: ['react', 'import'],
3
+  extends: ['airbnb-base', 'prettier', 'prettier/react'],
4
+  parser: 'typescript-eslint-parser',
5
+  plugins: ['react', 'react-native', 'typescript'],
6
   rules: {
6
   rules: {
7
     // Parens will be needed for arrow functions
7
     // Parens will be needed for arrow functions
8
     'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
8
     'arrow-parens': ['error', 'as-needed', { requireForBlockBody: true }],
14
       { devDependencies: true, peerDependencies: true },
14
       { devDependencies: true, peerDependencies: true },
15
     ],
15
     ],
16
     // Allows writing JSX in JS & TS files
16
     // Allows writing JSX in JS & TS files
17
-    // 'react/jsx-filename-extension': ['error', { extensions: ['.js', '.ts'] }],
17
+    'react/jsx-filename-extension': ['error', { extensions: ['.tsx'] }],
18
     // This rule doesn't play nice with Prettier
18
     // This rule doesn't play nice with Prettier
19
     'react/jsx-one-expression-per-line': 'off',
19
     'react/jsx-one-expression-per-line': 'off',
20
     // This rule doesn't play nice with Prettier
20
     // This rule doesn't play nice with Prettier
22
     // Remove this rule because we only destructure props, but never state
22
     // Remove this rule because we only destructure props, but never state
23
     'react/destructuring-assignment': 'off',
23
     'react/destructuring-assignment': 'off',
24
     // Restrict imports that should be used carefully. Usually we have created a wrapper around them
24
     // Restrict imports that should be used carefully. Usually we have created a wrapper around them
25
+
26
+    'typescript/adjacent-overload-signatures': 'error',
27
+    'typescript/explicit-function-return-type': 'error',
28
+    'typescript/no-angle-bracket-type-assertion': 'error',
29
+    'typescript/no-empty-interface': 'error',
30
+    'typescript/no-explicit-any': 'error',
31
+    'typescript/no-inferrable-types': 'error',
32
+    'typescript/no-namespace': 'error',
33
+    'typescript/no-non-null-assertion': 'error',
34
+    'typescript/no-triple-slash-reference': 'error',
35
+    'typescript/no-type-alias': 'error',
36
+    'typescript/prefer-namespace-keyword': 'error',
37
+    'typescript/type-annotation-spacing': 'error',
38
+
39
+    'no-unused-vars': 'off',
25
   },
40
   },
26
   overrides: [
41
   overrides: [
27
     {
42
     {
28
-      files: ['*.ts', '*.tsx'],
43
+      files: ['*.ts?(x)'],
29
       parser: 'typescript-eslint-parser',
44
       parser: 'typescript-eslint-parser',
30
-      plugins: ['react', 'import', 'typescript'],
31
-      rules: {
32
-        'typescript/adjacent-overload-signatures': 'error',
33
-        'typescript/explicit-function-return-type': 'error',
34
-        'typescript/no-angle-bracket-type-assertion': 'error',
35
-        'typescript/no-empty-interface': 'error',
36
-        'typescript/no-explicit-any': 'error',
37
-        'typescript/no-inferrable-types': 'error',
38
-        'typescript/no-namespace': 'error',
39
-        'typescript/no-non-null-assertion': 'error',
40
-        'typescript/no-triple-slash-reference': 'error',
41
-        'typescript/no-type-alias': 'error',
42
-        'typescript/prefer-namespace-keyword': 'error',
43
-        'typescript/type-annotation-spacing': 'error',
44
-      },
45
+      plugins: ['react', 'react-native', 'typescript'],
45
     },
46
     },
46
   ],
47
   ],
47
   settings: {
48
   settings: {
48
     'import/resolver': {
49
     'import/resolver': {
49
-      node: { extensions: ['.tsx', '.ts'] },
50
-    },
51
-    'import/cache:': {
52
-      lifetime: 2,
50
+      node: {
51
+        extensions: [
52
+          '.tsx',
53
+          '.ts',
54
+          '.android.tsx',
55
+          '.android.ts',
56
+          '.ios.tsx',
57
+          '.ios.ts',
58
+        ],
59
+      },
53
     },
60
     },
54
   },
61
   },
55
 };
62
 };

+ 0
- 2
.prettierrc.js View File

1
 // https://prettier.io/docs/en/options.html
1
 // https://prettier.io/docs/en/options.html
2
 
2
 
3
 module.exports = {
3
 module.exports = {
4
-  // Allow to parse .ts files and TS annotations
5
-  parser: 'typescript',
6
   // Enables semicolons at the end of statements
4
   // Enables semicolons at the end of statements
7
   semi: true,
5
   semi: true,
8
   // Formats strings with single quotes ('') instead of quotes ("")
6
   // Formats strings with single quotes ('') instead of quotes ("")

+ 17
- 4
.vscode/settings.json View File

1
 {
1
 {
2
-  "prettier.disableLanguages": [
3
-    "json"
4
-  ],
2
+  "files.associations": {
3
+    "*.test.js": "javascript",
4
+    "*.js": "javascriptreact",
5
+    "*.test.ts": "typescript",
6
+    "*.ts": "typescript",
7
+    "*.tsx": "typescriptreact"
8
+  },
9
+  "prettier.disableLanguages": ["json"],
5
   "prettier.eslintIntegration": true,
10
   "prettier.eslintIntegration": true,
6
-  "prettier.stylelintIntegration": true,
7
   "prettier.singleQuote": true,
11
   "prettier.singleQuote": true,
8
   "prettier.trailingComma": "all",
12
   "prettier.trailingComma": "all",
13
+  "eslint.options": {
14
+    "extensions": [".js", ".ts", ".tsx"]
15
+  },
16
+  "eslint.validate": [
17
+    "javascript",
18
+    "javascriptreact",
19
+    "typescript",
20
+    "typescriptreact"
21
+  ]
9
 }
22
 }

+ 1
- 0
.yarnrc View File

1
+save-exact true

+ 4
- 1
index.js View File

1
-import WebView from "./WebView";
1
+import WebView from './src/WebView';
2
 
2
 
3
+// We keep this for compatibility reasons.
3
 export { WebView };
4
 export { WebView };
5
+
6
+export default WebView;

+ 2
- 0
js/WebViewTypes.js View File

8
  * @flow
8
  * @flow
9
  */
9
  */
10
 
10
 
11
+ /* eslint-disable */
12
+
11
 'use strict';
13
 'use strict';
12
 
14
 
13
 import type {Node, Element, ComponentType} from 'react';
15
 import type {Node, Element, ComponentType} from 'react';

+ 10
- 6
package.json View File

12
   "homepage": "https://github.com/react-native-community/react-native-webview#readme",
12
   "homepage": "https://github.com/react-native-community/react-native-webview#readme",
13
   "scripts": {
13
   "scripts": {
14
     "ci:publish": "yarn semantic-release",
14
     "ci:publish": "yarn semantic-release",
15
-    "ci:test": "yarn ci:test:tsc",
16
-    "ci:test:tsc": "yarn tsc --noEmit -p tsconfig.json",
15
+    "ci:test": "yarn ci:test:types && yarn ci:test:lint",
16
+    "ci:test:types": "yarn tsc",
17
+    "ci:test:lint": "yarn eslint . --max-warnings=0 --ext .js,.ts,.tsx",
18
+    "eslint-check": "eslint --print-config . | eslint-config-prettier-check",
17
     "semantic-release": "semantic-release"
19
     "semantic-release": "semantic-release"
18
   },
20
   },
19
   "peerDependencies": {
21
   "peerDependencies": {
27
   "devDependencies": {
29
   "devDependencies": {
28
     "@semantic-release/git": "7.0.5",
30
     "@semantic-release/git": "7.0.5",
29
     "@types/invariant": "^2.2.29",
31
     "@types/invariant": "^2.2.29",
32
+    "@types/react": "16.7.7",
30
     "@types/react-native": "^0.57.6",
33
     "@types/react-native": "^0.57.6",
31
     "eslint": "5.9.0",
34
     "eslint": "5.9.0",
32
-    "eslint-config-airbnb": "17.1.0",
35
+    "eslint-config-airbnb-base": "13.1.0",
33
     "eslint-config-prettier": "3.3.0",
36
     "eslint-config-prettier": "3.3.0",
34
     "eslint-plugin-import": "2.14.0",
37
     "eslint-plugin-import": "2.14.0",
35
-    "eslint-plugin-jsx-a11y": "6.1.2",
36
     "eslint-plugin-react": "7.11.1",
38
     "eslint-plugin-react": "7.11.1",
37
     "eslint-plugin-react-native": "3.5.0",
39
     "eslint-plugin-react-native": "3.5.0",
38
-    "eslint-plugin-typescript": "0.13.0",
39
-    "prettier-eslint-cli": "4.7.1",
40
+    "eslint-plugin-typescript": "0.14.0",
41
+    "prettier-eslint-cli": "^4.7.1",
42
+    "react": "16.6.1",
43
+    "react-native": "0.57.5",
40
     "semantic-release": "15.10.3",
44
     "semantic-release": "15.10.3",
41
     "typescript": "3.1.6",
45
     "typescript": "3.1.6",
42
     "typescript-eslint-parser": "21.0.1"
46
     "typescript-eslint-parser": "21.0.1"

+ 21
- 21
src/WebView.android.tsx View File

1
 import React from 'react';
1
 import React from 'react';
2
 
2
 
3
-import ReactNative from 'react-native';
4
 import {
3
 import {
5
   ActivityIndicator,
4
   ActivityIndicator,
6
   StyleSheet,
5
   StyleSheet,
10
   NativeModules,
9
   NativeModules,
11
   Image,
10
   Image,
12
   NativeSyntheticEvent,
11
   NativeSyntheticEvent,
12
+  findNodeHandle,
13
 } from 'react-native';
13
 } from 'react-native';
14
 
14
 
15
 import invariant from 'invariant';
15
 import invariant from 'invariant';
33
   ERROR = 'ERROR',
33
   ERROR = 'ERROR',
34
 }
34
 }
35
 
35
 
36
-const defaultRenderLoading = () => (
36
+const defaultRenderLoading = (): React.ReactNode => (
37
   <View style={styles.loadingView}>
37
   <View style={styles.loadingView}>
38
     <ActivityIndicator style={styles.loadingProgressBar} />
38
     <ActivityIndicator style={styles.loadingProgressBar} />
39
   </View>
39
   </View>
61
     originWhitelist: WebViewShared.defaultOriginWhitelist,
61
     originWhitelist: WebViewShared.defaultOriginWhitelist,
62
   };
62
   };
63
 
63
 
64
-  static isFileUploadSupported = async () => {
64
+  static isFileUploadSupported = async (): Promise<boolean> =>
65
     // native implementation should return "true" only for Android 5+
65
     // native implementation should return "true" only for Android 5+
66
-    return NativeModules.RNCWebView.isFileUploadSupported();
67
-  };
66
+    NativeModules.RNCWebView.isFileUploadSupported();
68
 
67
 
69
   state: State = {
68
   state: State = {
70
     viewState: this.props.startInLoadingState
69
     viewState: this.props.startInLoadingState
75
 
74
 
76
   webViewRef = React.createRef<React.ComponentClass>();
75
   webViewRef = React.createRef<React.ComponentClass>();
77
 
76
 
78
-  render() {
77
+  render(): React.ReactNode {
79
     let otherView = null;
78
     let otherView = null;
80
 
79
 
81
     if (this.state.viewState === WebViewState.LOADING) {
80
     if (this.state.viewState === WebViewState.LOADING) {
82
       otherView = (this.props.renderLoading || defaultRenderLoading)();
81
       otherView = (this.props.renderLoading || defaultRenderLoading)();
83
     } else if (this.state.viewState === WebViewState.ERROR) {
82
     } else if (this.state.viewState === WebViewState.ERROR) {
84
       const errorEvent = this.state.lastErrorEvent;
83
       const errorEvent = this.state.lastErrorEvent;
85
-      invariant(errorEvent != null, 'lastErrorEvent expected to be non-null');
86
-      otherView =
87
-        this.props.renderError &&
88
-        this.props.renderError(
89
-          errorEvent!.domain,
90
-          errorEvent!.code,
91
-          errorEvent!.description,
92
-        );
84
+      if (errorEvent) {
85
+        otherView
86
+          = this.props.renderError
87
+          && this.props.renderError(
88
+            errorEvent.domain,
89
+            errorEvent.code,
90
+            errorEvent.description,
91
+          );
92
+      } else {
93
+        invariant(errorEvent != null, 'lastErrorEvent expected to be non-null');
94
+      }
93
     } else if (this.state.viewState !== WebViewState.IDLE) {
95
     } else if (this.state.viewState !== WebViewState.IDLE) {
94
       console.error(
96
       console.error(
95
-        'RNCWebView invalid state encountered: ' + this.state.viewState,
97
+        `RNCWebView invalid state encountered: ${this.state.viewState}`,
96
       );
98
       );
97
     }
99
     }
98
 
100
 
99
     const webViewStyles = [styles.container, this.props.style];
101
     const webViewStyles = [styles.container, this.props.style];
100
     if (
102
     if (
101
-      this.state.viewState === WebViewState.LOADING ||
102
-      this.state.viewState === WebViewState.ERROR
103
+      this.state.viewState === WebViewState.LOADING
104
+      || this.state.viewState === WebViewState.ERROR
103
     ) {
105
     ) {
104
       // if we're in either LOADING or ERROR states, don't show the webView
106
       // if we're in either LOADING or ERROR states, don't show the webView
105
       webViewStyles.push(styles.hidden);
107
       webViewStyles.push(styles.hidden);
128
       WebViewShared.originWhitelistToRegex,
130
       WebViewShared.originWhitelistToRegex,
129
     );
131
     );
130
 
132
 
131
-    let NativeWebView = nativeConfig.component || RNCWebView;
133
+    const NativeWebView = nativeConfig.component || RNCWebView;
132
 
134
 
133
     const webView = (
135
     const webView = (
134
       <NativeWebView
136
       <NativeWebView
246
     }
248
     }
247
   };
249
   };
248
 
250
 
249
-  getWebViewHandle = () => {
250
-    return ReactNative.findNodeHandle(this.webViewRef.current);
251
-  };
251
+  getWebViewHandle = () => findNodeHandle(this.webViewRef.current);
252
 
252
 
253
   onLoadingStart = (event: WebViewNavigationEvent) => {
253
   onLoadingStart = (event: WebViewNavigationEvent) => {
254
     const onLoadStart = this.props.onLoadStart;
254
     const onLoadStart = this.props.onLoadStart;

+ 18
- 20
src/WebView.ios.tsx View File

79
 ) => (
79
 ) => (
80
   <View style={styles.errorContainer}>
80
   <View style={styles.errorContainer}>
81
     <Text style={styles.errorTextTitle}>Error loading page</Text>
81
     <Text style={styles.errorTextTitle}>Error loading page</Text>
82
-    <Text style={styles.errorText}>{'Domain: ' + errorDomain}</Text>
83
-    <Text style={styles.errorText}>{'Error Code: ' + errorCode}</Text>
84
-    <Text style={styles.errorText}>{'Description: ' + errorDesc}</Text>
82
+    <Text style={styles.errorText}>{`Domain: ${errorDomain}`}</Text>
83
+    <Text style={styles.errorText}>{`Error Code: ${errorCode}`}</Text>
84
+    <Text style={styles.errorText}>{`Description: ${errorDesc}`}</Text>
85
   </View>
85
   </View>
86
 );
86
 );
87
 
87
 
112
   State
112
   State
113
 > {
113
 > {
114
   static JSNavigationScheme = JSNavigationScheme;
114
   static JSNavigationScheme = JSNavigationScheme;
115
+
115
   static NavigationType = NavigationType;
116
   static NavigationType = NavigationType;
116
 
117
 
117
   static defaultProps = {
118
   static defaultProps = {
119
     originWhitelist: WebViewShared.defaultOriginWhitelist,
120
     originWhitelist: WebViewShared.defaultOriginWhitelist,
120
   };
121
   };
121
 
122
 
122
-  static isFileUploadSupported = async () => {
123
+  static isFileUploadSupported = async () =>
123
     // no native implementation for iOS, depends only on permissions
124
     // no native implementation for iOS, depends only on permissions
124
-    return true;
125
-  };
125
+    true;
126
 
126
 
127
   state: State = {
127
   state: State = {
128
     viewState: this.props.startInLoadingState
128
     viewState: this.props.startInLoadingState
135
 
135
 
136
   UNSAFE_componentWillMount() {
136
   UNSAFE_componentWillMount() {
137
     if (
137
     if (
138
-      this.props.useWebKit === true &&
139
-      this.props.scalesPageToFit !== undefined
138
+      this.props.useWebKit === true
139
+      && this.props.scalesPageToFit !== undefined
140
     ) {
140
     ) {
141
       console.warn(
141
       console.warn(
142
         'The scalesPageToFit property is not supported when useWebKit = true',
142
         'The scalesPageToFit property is not supported when useWebKit = true',
143
       );
143
       );
144
     }
144
     }
145
     if (
145
     if (
146
-      !this.props.useWebKit &&
147
-      this.props.allowsBackForwardNavigationGestures
146
+      !this.props.useWebKit
147
+      && this.props.allowsBackForwardNavigationGestures
148
     ) {
148
     ) {
149
       console.warn(
149
       console.warn(
150
         'The allowsBackForwardNavigationGestures property is not supported when useWebKit = false',
150
         'The allowsBackForwardNavigationGestures property is not supported when useWebKit = false',
152
     }
152
     }
153
   }
153
   }
154
 
154
 
155
-  render() {
155
+  render(): React.ReactNode {
156
     let otherView = null;
156
     let otherView = null;
157
 
157
 
158
     let scalesPageToFit;
158
     let scalesPageToFit;
175
       );
175
       );
176
     } else if (this.state.viewState !== WebViewState.IDLE) {
176
     } else if (this.state.viewState !== WebViewState.IDLE) {
177
       console.error(
177
       console.error(
178
-        'RNCWebView invalid state encountered: ' + this.state.viewState,
178
+        `RNCWebView invalid state encountered: ${this.state.viewState}`,
179
       );
179
       );
180
     }
180
     }
181
 
181
 
182
     const webViewStyles = [styles.container, styles.webView, this.props.style];
182
     const webViewStyles = [styles.container, styles.webView, this.props.style];
183
     if (
183
     if (
184
-      this.state.viewState === WebViewState.LOADING ||
185
-      this.state.viewState === WebViewState.ERROR
184
+      this.state.viewState === WebViewState.LOADING
185
+      || this.state.viewState === WebViewState.ERROR
186
     ) {
186
     ) {
187
       // if we're in either LOADING or ERROR states, don't show the webView
187
       // if we're in either LOADING or ERROR states, don't show the webView
188
       webViewStyles.push(styles.hidden);
188
       webViewStyles.push(styles.hidden);
216
         Linking.openURL(url);
216
         Linking.openURL(url);
217
       }
217
       }
218
       if (this.props.onShouldStartLoadWithRequest) {
218
       if (this.props.onShouldStartLoadWithRequest) {
219
-        shouldStart =
220
-          shouldStart &&
221
-          this.props.onShouldStartLoadWithRequest(event.nativeEvent);
219
+        shouldStart
220
+          = shouldStart
221
+          && this.props.onShouldStartLoadWithRequest(event.nativeEvent);
222
       }
222
       }
223
       invariant(viewManager != null, 'viewManager expected to be non-null');
223
       invariant(viewManager != null, 'viewManager expected to be non-null');
224
       viewManager.startLoadWithResult(
224
       viewManager.startLoadWithResult(
392
   /**
392
   /**
393
    * Returns the native `WebView` node.
393
    * Returns the native `WebView` node.
394
    */
394
    */
395
-  getWebViewHandle = () => {
396
-    return findNodeHandle(this.webViewRef.current);
397
-  };
395
+  getWebViewHandle = () => findNodeHandle(this.webViewRef.current);
398
 
396
 
399
   _onLoadingStart = (event: WebViewNavigationEvent) => {
397
   _onLoadingStart = (event: WebViewNavigationEvent) => {
400
     const onLoadStart = this.props.onLoadStart;
398
     const onLoadStart = this.props.onLoadStart;

+ 3
- 4
src/WebViewShared.ts View File

1
-const escapeStringRegexp = require('escape-string-regexp');
1
+import escapeStringRegexp from 'escape-string-regexp';
2
 
2
 
3
 const WebViewShared = {
3
 const WebViewShared = {
4
   defaultOriginWhitelist: ['http://*', 'https://*'],
4
   defaultOriginWhitelist: ['http://*', 'https://*'],
6
     const result = /^[A-Za-z0-9]+:(\/\/)?[^/]*/.exec(url);
6
     const result = /^[A-Za-z0-9]+:(\/\/)?[^/]*/.exec(url);
7
     return result === null ? '' : result[0];
7
     return result === null ? '' : result[0];
8
   },
8
   },
9
-  originWhitelistToRegex: (originWhitelist: string): string => {
10
-    return escapeStringRegexp(originWhitelist).replace(/\\\*/g, '.*');
11
-  },
9
+  originWhitelistToRegex: (originWhitelist: string): string =>
10
+    escapeStringRegexp(originWhitelist).replace(/\\\*/g, '.*'),
12
 };
11
 };
13
 
12
 
14
 export default WebViewShared;
13
 export default WebViewShared;

+ 2
- 2
src/index.ts View File

1
-export * from './types/WebViewTypes'
2
-export * from './WebView.ios'
1
+export * from './types/WebViewTypes';
2
+export * from './WebView.ios';

+ 4
- 0
src/test.ts View File

1
+const a
2
+  = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
3
+
4
+console.log(a);

+ 12
- 0
src/test.tsx View File

1
+import React from 'react';
2
+
3
+const Test: React.SFC<{
4
+  show: boolean;
5
+}> = ({ show }): React.ReactElement<string> => show && <div />;
6
+
7
+const a =
8
+  'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
9
+
10
+console.log(a);
11
+
12
+export default Test;

+ 2
- 2
src/types/WebViewTypes.ts View File

68
 
68
 
69
 export type WebViewErrorEvent = NativeSyntheticEvent<WebViewError>;
69
 export type WebViewErrorEvent = NativeSyntheticEvent<WebViewError>;
70
 
70
 
71
-export type DataDetectorTypes =
72
-  | 'phoneNumber'
71
+export type DataDetectorTypes
72
+  = | 'phoneNumber'
73
   | 'link'
73
   | 'link'
74
   | 'address'
74
   | 'address'
75
   | 'calendarEvent'
75
   | 'calendarEvent'

+ 3
- 2
src/utils.ts View File

1
-import { WebViewSourceUri } from "./types/WebViewTypes";
1
+import { WebViewSourceUri } from './types/WebViewTypes';
2
+
2
 export const isWebViewUriSource = (source: any): source is WebViewSourceUri =>
3
 export const isWebViewUriSource = (source: any): source is WebViewSourceUri =>
3
-  typeof source !== "number" && !("html" in source);
4
+  typeof source !== 'number' && !('html' in source);

+ 5
- 14
tsconfig.json View File

3
     "allowSyntheticDefaultImports": true,
3
     "allowSyntheticDefaultImports": true,
4
     "esModuleInterop": true,
4
     "esModuleInterop": true,
5
     "jsx": "react-native",
5
     "jsx": "react-native",
6
+    "lib": ["es6"],
6
     "module": "esnext",
7
     "module": "esnext",
7
     "moduleResolution": "node",
8
     "moduleResolution": "node",
8
     "noEmit": true,
9
     "noEmit": true,
9
     "noFallthroughCasesInSwitch": true,
10
     "noFallthroughCasesInSwitch": true,
10
-    "noImplicitAny": true,
11
     "noImplicitReturns": true,
11
     "noImplicitReturns": true,
12
-    "noImplicitThis": true,
13
     "noUnusedLocals": true,
12
     "noUnusedLocals": true,
14
     "noUnusedParameters": true,
13
     "noUnusedParameters": true,
15
     "pretty": true,
14
     "pretty": true,
16
     "skipLibCheck": true,
15
     "skipLibCheck": true,
17
-    "strict": true,
16
+    "strict": true
18
   },
17
   },
19
-  "include": [
20
-    "src",
21
-    "./typings.d.ts",
22
-    "types",
23
-    "test"
24
-  ],
25
-  "exclude": [
26
-    "node_modules",
27
-    "dist"
28
-  ]
29
-}
18
+  "include": ["src", "./typings.d.ts", "types", "test"],
19
+  "exclude": ["node_modules"]
20
+}

+ 2188
- 87
yarn.lock
File diff suppressed because it is too large
View File