Skip to content

Commit

Permalink
apply the new lints
Browse files Browse the repository at this point in the history
  • Loading branch information
hamidzr committed Jun 22, 2020
1 parent abbf130 commit 344c6c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions webui/react/src/components/TaskTable.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Table } from 'antd';
import { ColumnsType, ColumnType } from 'antd/lib/table';
import React, { MouseEventHandler } from 'react';
import TimeAgo from 'timeago-react';

import { actionsColumn, Renderer, startTimeColumn, stateColumn,
userColumn } from 'table/columns';
Expand Down Expand Up @@ -47,12 +46,12 @@ const columns: ColumnsType<CommandTask> = [

export const tableRowClickHandler = (record: AnyTask): {onClick?: MouseEventHandler} => (
{
/*
/*
* Can't use an actual link element on the whole row since anchor tag
* is not a valid direct tr child.
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr
*/
onClick: canBeOpened(record) ? makeClickHandler(record.url as string) : undefined,
onClick: canBeOpened(record) ? makeClickHandler(record.url as string) : undefined,
}
);

Expand Down
2 changes: 1 addition & 1 deletion webui/react/src/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const isExperiment = (obj: AnyTask | Experiment): obj is Experiment => {
};

// used when properties are named differently between objects.
// DISCUSS is there a better TS way?
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
export const oneOfProperties = <T>(obj: any, props: string[]): T => {
for (const prop of props) {
if (prop in obj) return obj[prop] as T;
Expand Down

0 comments on commit 344c6c8

Please sign in to comment.