Browse Source

Clean up code styles

iou90 4 years ago
parent
commit
09f80e626f
2 changed files with 3 additions and 11 deletions
  1. 2
    6
      .eslintrc.js
  2. 1
    5
      autoHeightWebView/index.js

+ 2
- 6
.eslintrc.js View File

@@ -2,11 +2,7 @@ module.exports = {
2 2
   root: true,
3 3
   extends: '@react-native-community',
4 4
   rules: {
5
-    'prettier/prettier': [
6
-      {
7
-        singleQuote: true
8
-      }
9
-    ],
10
-    'comma-dangle': 'off'
5
+    'comma-dangle': 'off',
6
+    'no-unused-vars': 'error'
11 7
   }
12 8
 };

+ 1
- 5
autoHeightWebView/index.js View File

@@ -12,11 +12,7 @@ import { reduceData, getWidth, isSizeChanged, shouldUpdate } from './utils';
12 12
 
13 13
 const AutoHeightWebView = React.memo(
14 14
   forwardRef((props, ref) => {
15
-    const { style, onMessage, onSizeUpdated, scrollEnabledWithZoomedin, scrollEnabled, source } = props;
16
-
17
-    if (!source) {
18
-      return null;
19
-    }
15
+    const { style, onMessage, onSizeUpdated, scrollEnabledWithZoomedin, scrollEnabled } = props;
20 16
 
21 17
     let webView = useRef();
22 18
     useImperativeHandle(ref, () => ({