From: Lucas Di Pentima Date: Tue, 13 Jul 2021 00:21:50 +0000 (-0300) Subject: 17782: Removes the last linter warnings. X-Git-Tag: 2.2.2~29^2~1 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/c32095f06a2e2843386120bf21402974b0066954 17782: Removes the last linter warnings. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/src/common/url.ts b/src/common/url.ts index 185737ca..6d66778a 100644 --- a/src/common/url.ts +++ b/src/common/url.ts @@ -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, ' ')); diff --git a/src/components/tree/virtual-tree.tsx b/src/components/tree/virtual-tree.tsx index f353fd05..ca7cd40c 100644 --- a/src/components/tree/virtual-tree.tsx +++ b/src/components/tree/virtual-tree.tsx @@ -84,6 +84,7 @@ export interface VirtualTreeItem extends TreeItem { // For some reason, on TSX files it isn't accepted just one generic param, so // I'm using as a workaround. +// eslint-disable-next-line export const Row = (itemList: VirtualTreeItem[], render: any, treeProps: TreeProps) => withStyles(styles)( (props: React.PropsWithChildren & WithStyles) => { const { index, style, classes } = props; @@ -174,6 +175,7 @@ export const Row = (itemList: VirtualTreeItem[], render: any, treeProp const itemSize = 30; +// eslint-disable-next-line export const VirtualList = (height: number, width: number, items: VirtualTreeItem[], render: any, treeProps: TreeProps) => ) }; 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 diff --git a/src/store/dialog/with-dialog.ts b/src/store/dialog/with-dialog.ts index 78543fc9..ea96ca0d 100644 --- a/src/store/dialog/with-dialog.ts +++ b/src/store/dialog/with-dialog.ts @@ -20,6 +20,7 @@ export type WithDialogDispatchProps = { export type WithDialogProps = WithDialogStateProps & WithDialogDispatchProps; export const withDialog = (id: string) => // TODO: How to make compiler happy with & P instead of & any? + // eslint-disable-next-line (component: React.ComponentType & any>) => connect(mapStateToProps(id), mapDispatchToProps(id))(component); diff --git a/src/views/workbench/fed-login.tsx b/src/views/workbench/fed-login.tsx index 14229519..595f136b 100644 --- a/src/views/workbench/fed-login.tsx +++ b/src/views/workbench/fed-login.tsx @@ -42,7 +42,7 @@ export const FedLogin = connect(mapStateToProps)( } const fedtoken = (remoteHostsConfig[k].loginCluster === localCluster) ? apiToken : getSaltedToken(k, apiToken); - return