From 31360a4597863da09019edbbfbec6060e8c584c1 Mon Sep 17 00:00:00 2001 From: Victoria A <52001888+adjeiv@users.noreply.github.com> Date: Fri, 27 Oct 2023 08:21:49 +0100 Subject: [PATCH] Lint --- optuna_dashboard/ts/components/DataGrid.tsx | 4 +++- standalone_app/src/components/DataGrid.tsx | 4 +++- standalone_app/src/components/TrialTable.tsx | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/optuna_dashboard/ts/components/DataGrid.tsx b/optuna_dashboard/ts/components/DataGrid.tsx index d19ec9d9..24e45dc7 100644 --- a/optuna_dashboard/ts/components/DataGrid.tsx +++ b/optuna_dashboard/ts/components/DataGrid.tsx @@ -359,7 +359,9 @@ function stableSort( stabilizedThis.sort((a, b) => { if (less) { const ascending = order == "asc" - const result = ascending ? -less(a[0], b[0], ascending) : less(a[0], b[0], ascending) + const result = ascending + ? -less(a[0], b[0], ascending) + : less(a[0], b[0], ascending) if (result !== 0) return result } else { const result = comparator(a[0], b[0]) diff --git a/standalone_app/src/components/DataGrid.tsx b/standalone_app/src/components/DataGrid.tsx index d19ec9d9..24e45dc7 100644 --- a/standalone_app/src/components/DataGrid.tsx +++ b/standalone_app/src/components/DataGrid.tsx @@ -359,7 +359,9 @@ function stableSort( stabilizedThis.sort((a, b) => { if (less) { const ascending = order == "asc" - const result = ascending ? -less(a[0], b[0], ascending) : less(a[0], b[0], ascending) + const result = ascending + ? -less(a[0], b[0], ascending) + : less(a[0], b[0], ascending) if (result !== 0) return result } else { const result = comparator(a[0], b[0]) diff --git a/standalone_app/src/components/TrialTable.tsx b/standalone_app/src/components/TrialTable.tsx index 5a0efc96..97a04f3c 100644 --- a/standalone_app/src/components/TrialTable.tsx +++ b/standalone_app/src/components/TrialTable.tsx @@ -65,7 +65,7 @@ export const TrialTable: FC<{ return 0 } if (firstVal === undefined) { - return ascending ? -1 : 1 + return ascending ? -1 : 1 } else if (secondVal === undefined) { return ascending ? 1 : -1 }