From 41d6e79cb3f9c901542bea1ddaa06fd52b6b06c6 Mon Sep 17 00:00:00 2001 From: Emma Segal-Grossman Date: Tue, 19 Mar 2024 17:22:27 -0400 Subject: [PATCH] Clean up ESLint warnings in main (#1616) See title. The only place this changes behaviour is in the placeholder page list, which will be replaced by the real one shortly, so I'm going to just merge this. --- frontend/src/components/ui/dialog.ts | 5 +---- frontend/src/features/qa/page-qa-toolbar.ts | 2 +- frontend/src/pages/org/archived-item-qa.ts | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/frontend/src/components/ui/dialog.ts b/frontend/src/components/ui/dialog.ts index 4cfd3ccf..17972851 100644 --- a/frontend/src/components/ui/dialog.ts +++ b/frontend/src/components/ui/dialog.ts @@ -66,9 +66,6 @@ export class Dialog extends SlDialog { * TODO refactor dialog instances that self implements `form.requestSubmit` */ submit = () => { - const form = this.formElems[0]; - if (!form) return; - - form.requestSubmit(); + this.formElems[0]?.requestSubmit(); }; } diff --git a/frontend/src/features/qa/page-qa-toolbar.ts b/frontend/src/features/qa/page-qa-toolbar.ts index dd6f209a..fe184b87 100644 --- a/frontend/src/features/qa/page-qa-toolbar.ts +++ b/frontend/src/features/qa/page-qa-toolbar.ts @@ -407,7 +407,7 @@ export class PageQAToolbar extends TailwindElement { }, ); - this.fetchPage(); + void this.fetchPage(); this.notify.toast({ message: msg("Successfully deleted comment."), diff --git a/frontend/src/pages/org/archived-item-qa.ts b/frontend/src/pages/org/archived-item-qa.ts index 6c7045d5..f5494a3b 100644 --- a/frontend/src/pages/org/archived-item-qa.ts +++ b/frontend/src/pages/org/archived-item-qa.ts @@ -215,9 +215,7 @@ export class ArchivedItemQA extends TailwindElement { )} pg ${this.pages.page} of - ${this.pages - ? Math.ceil(this.pages.total / this.pages.pageSize) - : "unknown"} + ${Math.ceil(this.pages.total / this.pages.pageSize)} `;