From e715ce14e53816c50bc8534ec607a9606150c9df Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sat, 5 Oct 2024 17:52:01 +0200 Subject: [PATCH] Feature/switch typescript-eslint no-unused-expressions rule to error (#3872) * Switch @typescript-eslint/no-unused-expressions to error (remove from eslint configuration) --- .eslintrc.json | 1 - .../lib/activities-table/activities-table.component.ts | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 59b7e8b89..4078da0e8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -107,7 +107,6 @@ "@typescript-eslint/no-unsafe-argument": "warn", "@typescript-eslint/no-unsafe-assignment": "warn", "@typescript-eslint/no-unsafe-enum-comparison": "warn", - "@typescript-eslint/no-unused-expressions": "warn", "@typescript-eslint/no-unsafe-member-access": "warn", "@typescript-eslint/no-unsafe-return": "warn", "@typescript-eslint/no-unused-vars": "warn", diff --git a/libs/ui/src/lib/activities-table/activities-table.component.ts b/libs/ui/src/lib/activities-table/activities-table.component.ts index 4f8fff904..67f81adce 100644 --- a/libs/ui/src/lib/activities-table/activities-table.component.ts +++ b/libs/ui/src/lib/activities-table/activities-table.component.ts @@ -269,9 +269,13 @@ export class GfActivitiesTableComponent } public toggleAllRows() { - this.areAllRowsSelected() - ? this.selectedRows.clear() - : this.dataSource.data.forEach((row) => this.selectedRows.select(row)); + if (this.areAllRowsSelected()) { + this.selectedRows.clear(); + } else { + this.dataSource.data.forEach((row) => { + this.selectedRows.select(row); + }); + } this.selectedActivities.emit(this.selectedRows.selected); }