Pārlūkot izejas kodu

Clean up code styles

iou90 5 gadus atpakaļ
vecāks
revīzija
09f80e626f
2 mainītis faili ar 3 papildinājumiem un 11 dzēšanām
  1. 2
    6
      .eslintrc.js
  2. 1
    5
      autoHeightWebView/index.js

+ 2
- 6
.eslintrc.js Parādīt failu

2
   root: true,
2
   root: true,
3
   extends: '@react-native-community',
3
   extends: '@react-native-community',
4
   rules: {
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 Parādīt failu

12
 
12
 
13
 const AutoHeightWebView = React.memo(
13
 const AutoHeightWebView = React.memo(
14
   forwardRef((props, ref) => {
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
     let webView = useRef();
17
     let webView = useRef();
22
     useImperativeHandle(ref, () => ({
18
     useImperativeHandle(ref, () => ({