21037: fixed most of the linter warnings Arvados-DCO-1.1-Signed-off-by: Lisa Knox...
[arvados.git] / services / workbench2 / src / components / collection-panel-files / collection-panel-files.tsx
index 83de48dec8fb40552e7d5e3a970b27d087ef6983..03d4551cabcc7a4beb4f2b33749046209ce89547 100644 (file)
@@ -311,6 +311,8 @@ export const CollectionPanelFiles = withStyles(styles)(
                             return { ...next, ...prev };
                         }, {});
                     setPathData(state => ({ ...state, ...newState }));
+                }, () => {
+                    // Nothing to do
                 })
                 .finally(() => {
                     setIsLoading(false);
@@ -324,14 +326,16 @@ export const CollectionPanelFiles = withStyles(styles)(
                 setLeftSearch("");
                 setRightSearch("");
             }
-        }, [rightKey, rightData]); // eslint-disable-line react-hooks/exhaustive-deps
+            // eslint-disable-next-line react-hooks/exhaustive-deps
+        }, [rightKey, rightData]); 
 
         const currentPDH = (collectionPanel.item || {}).portableDataHash;
         React.useEffect(() => {
             if (currentPDH) {
                 fetchData([leftKey, rightKey], true);
             }
-        }, [currentPDH]); // eslint-disable-line react-hooks/exhaustive-deps
+            // eslint-disable-next-line react-hooks/exhaustive-deps
+        }, [currentPDH]); 
 
         React.useEffect(() => {
             if (rightData) {
@@ -431,7 +435,7 @@ export const CollectionPanelFiles = withStyles(styles)(
                             getInlineFileUrl(enhancedItem.url, config.keepWebServiceUrl, config.keepWebInlineServiceUrl),
                             true
                         );
-                        window.open(fileUrl, "_blank");
+                        window.open(fileUrl, "_blank", "noopener");
                     }
                 }
 
@@ -449,7 +453,8 @@ export const CollectionPanelFiles = withStyles(styles)(
                     onItemMenuOpen(event, item, isWritable);
                 }
             },
-            [path, setPath, collectionPanelFiles] // eslint-disable-line react-hooks/exhaustive-deps
+            // eslint-disable-next-line react-hooks/exhaustive-deps
+            [path, setPath, collectionPanelFiles] 
         );
 
         const getItemIcon = React.useCallback(
@@ -485,7 +490,8 @@ export const CollectionPanelFiles = withStyles(styles)(
             (ev, isWritable) => {
                 props.onOptionsMenuOpen(ev, isWritable);
             },
-            [props.onOptionsMenuOpen] // eslint-disable-line react-hooks/exhaustive-deps
+            // eslint-disable-next-line react-hooks/exhaustive-deps
+            [props.onOptionsMenuOpen] 
         );
 
         return (