Satisfy eslint
authorTim Düsterhus <duesterhus@woltlab.com>
Mon, 30 Aug 2021 10:33:04 +0000 (12:33 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Mon, 30 Aug 2021 10:33:04 +0000 (12:33 +0200)
ts/WoltLabSuite/Core/Form/Builder/Field/Dependency/Container/Tab.ts
ts/WoltLabSuite/Core/Ui/Message/Quote.ts
ts/WoltLabSuite/Core/Ui/Poll/Editor.ts
ts/WoltLabSuite/Core/Ui/Reaction/Handler.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Reaction/Handler.js

index a6dd045f53b9d29ed092d5698912c06a0f4cacb4..f8935dd3c05653faeb5fd27b71ba4adcac03910d 100644 (file)
@@ -31,11 +31,11 @@ class Tab extends Abstract {
     if (containerIsVisible !== containerShouldBeVisible) {
       const tabMenuListItem = this._container.parentNode!.parentNode!.querySelector(
         "#" +
-          DomUtil.identify(this._container.parentNode! as HTMLElement) +
+          DomUtil.identify(this._container.parentNode as HTMLElement) +
           " > nav > ul > li[data-name=" +
           this._container.id +
           "]",
-      )! as HTMLElement;
+      ) as HTMLElement;
       if (tabMenuListItem === null) {
         throw new Error("Cannot find tab menu entry for tab '" + this._container.id + "'.");
       }
index cf9f4a663cd6920ea4bb0284e9c7b96ea9a1518e..63768264c095597b0e8b46a04b04f60982a8a00f 100644 (file)
@@ -313,7 +313,7 @@ export class UiMessageQuote implements AjaxCallbackObject {
     const container = this.containers.get(this.activeMessageId)!;
     const objectId = ~~container.dataset.objectId!;
     const content = this.messageBodySelector
-      ? (container.querySelector(this.messageBodySelector)! as HTMLElement)
+      ? (container.querySelector(this.messageBodySelector) as HTMLElement)
       : container;
 
     let anchorNode = selection.anchorNode;
index 192ea8526415459cf5c3c43371df013f8c0b7e39..743ec5e7f7f5f1f2f9d80e72b9a0adb456820987 100644 (file)
@@ -378,7 +378,7 @@ class UiPollEditor {
   public getOptions(): string[] {
     const options: string[] = [];
     Array.from(this.optionList.children).forEach((listItem: HTMLLIElement) => {
-      const optionValue = (listItem.querySelector("input[type=text]")! as HTMLInputElement).value.trim();
+      const optionValue = (listItem.querySelector("input[type=text]") as HTMLInputElement).value.trim();
 
       if (optionValue !== "") {
         options.push(`${listItem.dataset.optionId!}_${optionValue}`);
index 32ffd5c35ddb69d84012c07c5f0fce89de033b6f..6ee7982feb7cd83dc357e77ab5221171e27fefec 100644 (file)
@@ -200,11 +200,11 @@ class UiReactionHandler {
 
   protected _markReactionAsActive(): void {
     let reactionTypeID: number | null = null;
-    this._objects.get(this._popoverCurrentObjectId)!.forEach((element) => {
+    for (const element of this._objects.get(this._popoverCurrentObjectId)!) {
       if (element.reactButton !== null) {
         reactionTypeID = ~~element.reactButton.dataset.reactionTypeId!;
       }
-    });
+    }
 
     if (reactionTypeID === null) {
       throw new Error("Unable to find react button for current popover.");
@@ -220,7 +220,7 @@ class UiReactionHandler {
     const scrollableContainer = popover.querySelector(".reactionPopoverContent") as HTMLElement;
     if (reactionTypeID) {
       const reactionTypeButton = popover.querySelector(
-        `.reactionTypeButton[data-reaction-type-id="${reactionTypeID!}"]`,
+        `.reactionTypeButton[data-reaction-type-id="${reactionTypeID}"]`,
       ) as HTMLElement;
       reactionTypeButton.classList.add("active");
       reactionTypeButton.setAttribute("aria-selected", "true");
index 19eab9274ed4cdb389a8286c497f05f9f3bb7f3c..7f8b0f9676da8bbc6f5c641c2e3567053865898b 100644 (file)
@@ -129,11 +129,11 @@ define(["require", "exports", "tslib", "../../Ajax", "../../Core", "../../Dom/Ch
         }
         _markReactionAsActive() {
             let reactionTypeID = null;
-            this._objects.get(this._popoverCurrentObjectId).forEach((element) => {
+            for (const element of this._objects.get(this._popoverCurrentObjectId)) {
                 if (element.reactButton !== null) {
                     reactionTypeID = ~~element.reactButton.dataset.reactionTypeId;
                 }
-            });
+            }
             if (reactionTypeID === null) {
                 throw new Error("Unable to find react button for current popover.");
             }