17782: Removes the last linter warnings.
authorLucas Di Pentima <lucas.dipentima@curii.com>
Tue, 13 Jul 2021 00:21:50 +0000 (21:21 -0300)
committerLucas Di Pentima <lucas.dipentima@curii.com>
Tue, 13 Jul 2021 00:21:50 +0000 (21:21 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>

src/common/url.ts
src/components/tree/virtual-tree.tsx
src/services/collection-service/collection-service-files-response.ts
src/store/dialog/with-dialog.ts
src/views/workbench/fed-login.tsx
src/views/workbench/workbench-loading-screen.tsx

index 185737cac331d2a6a5eece01e8f99f293f76c230..6d66778ad3a681bb05598aba7484b49bbb7e8007 100644 (file)
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 export function getUrlParameter(search: string, name: string) {
-    const safeName = name.replace(/[\[]/, '\\[').replace(/[\]]/, '\\]');
+    const safeName = name.replace(/[[]/, '\\[').replace(/[\]]/, '\\]');
     const regex = new RegExp('[\\?&]' + safeName + '=([^&#]*)');
     const results = regex.exec(search);
     return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
index f353fd05417cf1a7071e61276e815cbdfca2eb11..ca7cd40caf43d4633a9b99bb111d29df204df97d 100644 (file)
@@ -84,6 +84,7 @@ export interface VirtualTreeItem<T> extends TreeItem<T> {
 
 // For some reason, on TSX files it isn't accepted just one generic param, so
 // I'm using <T, _> as a workaround.
+// eslint-disable-next-line
 export const Row =  <T, _>(itemList: VirtualTreeItem<T>[], render: any, treeProps: TreeProps<T>) => withStyles(styles)(
     (props: React.PropsWithChildren<ListChildComponentProps> & WithStyles<CssRules>) => {
         const { index, style, classes } = props;
@@ -174,6 +175,7 @@ export const Row =  <T, _>(itemList: VirtualTreeItem<T>[], render: any, treeProp
 
 const itemSize = 30;
 
+// eslint-disable-next-line
 export const VirtualList = <T, _>(height: number, width: number, items: VirtualTreeItem<T>[], render: any, treeProps: TreeProps<T>) =>
     <FixedSizeList
         height={height}
index 36cb3dc6030ab3c195fbf84a95782503ea0ff71e..b7e1f9c711e3cda968a1f39ffe78bfde7a0d7191 100644 (file)
@@ -20,7 +20,7 @@ export const sortFilesTree = (tree: Tree<CollectionDirectory | CollectionFile>)
 };
 
 export const extractFilesData = (document: Document) => {
-    const collectionUrlPrefix = /\/c=([^\/]*)/;
+    const collectionUrlPrefix = /\/c=([^/]*)/;
     return Array
         .from(document.getElementsByTagName('D:response'))
         .slice(1) // omit first element which is collection itself
index 78543fc989db5f30a79a6c11b6021adca265a2ac..ea96ca0d7621b1959c38e3fb5bc25eaaded59a98 100644 (file)
@@ -20,6 +20,7 @@ export type WithDialogDispatchProps = {
 export type WithDialogProps<T> = WithDialogStateProps<T> & WithDialogDispatchProps;
 export const withDialog = (id: string) =>
     // TODO: How to make compiler happy with & P instead of & any?
+    // eslint-disable-next-line
     <T, P>(component: React.ComponentType<WithDialogProps<T> & any>) =>
         connect(mapStateToProps(id), mapDispatchToProps(id))(component);
 
index 142295197fba68192c1597e0267f0315ff8b3970..595f136b801d3a288146845e0133842ccf56c4dc 100644 (file)
@@ -42,7 +42,7 @@ export const FedLogin = connect(mapStateToProps)(
                         }
                         const fedtoken = (remoteHostsConfig[k].loginCluster === localCluster)
                             ? apiToken : getSaltedToken(k, apiToken);
-                        return <iframe key={k} src={`${remoteHostsConfig[k].workbench2Url}/fedtoken?api_token=${fedtoken}`} style={{
+                        return <iframe key={k} title={k} src={`${remoteHostsConfig[k].workbench2Url}/fedtoken?api_token=${fedtoken}`} style={{
                             height: 0,
                             width: 0,
                             visibility: "hidden"
index 584ba3ae33c5dba24e0c040a204a0d968ae05479..1b70ece6dc380d3ec6b02cfbbd4ae1b31ae0b29e 100644 (file)
@@ -26,7 +26,7 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
 
 export const WorkbenchLoadingScreen = withStyles(styles)(({ classes }: WithStyles<CssRules>) =>
     <Grid container direction="column" alignItems='center' justify='center' className={classes.root}>
-        <img src='/arvados_logo.png' className={classes.img} />
+        <img src='/arvados_logo.png' alt='Arvados logo' className={classes.img} />
         <CircularProgress data-cy='loading-spinner' />
     </Grid>
 );