From: Tim Düsterhus Date: Fri, 30 Oct 2020 10:12:08 +0000 (+0100) Subject: Make everything @typescript-eslint/ban-ts-comment clean X-Git-Tag: 5.4.0_Alpha_1~672 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=93e78c2336b1ab09faa193732ffaa24b4e88afc2;p=GitHub%2FWoltLab%2FWCF.git Make everything @typescript-eslint/ban-ts-comment clean --- diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Language.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Language.js index 7a7062b388..fa38716264 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Language.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Language.js @@ -43,9 +43,8 @@ define(["require", "exports", "tslib", "./Template"], function (require, exports if (value === undefined) { return key; } - // fetch Template, as it cannot be provided because of a circular dependency if (Template_1.default === undefined) { - //@ts-ignore + // @ts-expect-error: This is required due to a circular dependency. Template_1.default = require("./Template"); } if (typeof value === "string") { diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/StringUtil.js b/wcfsetup/install/files/js/WoltLabSuite/Core/StringUtil.js index 25f8c4eb35..e65b732b00 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/StringUtil.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/StringUtil.js @@ -21,7 +21,7 @@ define(["require", "exports", "tslib", "./Language", "./NumberUtil"], function ( function addThousandsSeparator(number) { // Fetch Language, as it cannot be provided because of a circular dependency if (Language === undefined) { - //@ts-ignore + // @ts-expect-error: This is required due to a circular dependency. Language = require("./Language"); } return String(number).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g, "$1" + Language.get("wcf.global.thousandsSeparator")); @@ -49,7 +49,7 @@ define(["require", "exports", "tslib", "./Language", "./NumberUtil"], function ( function formatNumeric(number, decimalPlaces) { // Fetch Language, as it cannot be provided because of a circular dependency if (Language === undefined) { - //@ts-ignore + // @ts-expect-error: This is required due to a circular dependency. Language = require("./Language"); } let tmp = NumberUtil.round(number, decimalPlaces || -2).toString(); diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Template.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Template.js index 36e07a4afa..16d68aa2c0 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Template.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Template.js @@ -26,13 +26,12 @@ define(["require", "exports", "tslib", "./Template.grammar", "./StringUtil", "./ parser = new Parser();*/ class Template { constructor(template) { - // Fetch Language/StringUtil, as it cannot be provided because of a circular dependency if (Language === undefined) { - //@ts-ignore + // @ts-expect-error: This is required due to a circular dependency. Language = require("./Language"); } if (StringUtil === undefined) { - //@ts-ignore + // @ts-expect-error: This is required due to a circular dependency. StringUtil = require("./StringUtil"); } try { diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Language.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Language.ts index a4459f5d96..377b14715c 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Language.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Language.ts @@ -43,9 +43,8 @@ export function get(key: string, parameters?: object): string { return key; } - // fetch Template, as it cannot be provided because of a circular dependency if (Template === undefined) { - //@ts-ignore + // @ts-expect-error: This is required due to a circular dependency. Template = require("./Template"); } diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/StringUtil.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/StringUtil.ts index ba686e7c9b..67259fd657 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/StringUtil.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/StringUtil.ts @@ -19,7 +19,7 @@ import * as NumberUtil from "./NumberUtil"; export function addThousandsSeparator(number: number): string { // Fetch Language, as it cannot be provided because of a circular dependency if (Language === undefined) { - //@ts-ignore + // @ts-expect-error: This is required due to a circular dependency. Language = require("./Language"); } @@ -51,7 +51,7 @@ export function escapeRegExp(string: string): string { export function formatNumeric(number: number, decimalPlaces?: number): string { // Fetch Language, as it cannot be provided because of a circular dependency if (Language === undefined) { - //@ts-ignore + // @ts-expect-error: This is required due to a circular dependency. Language = require("./Language"); } diff --git a/wcfsetup/install/files/ts/WoltLabSuite/Core/Template.ts b/wcfsetup/install/files/ts/WoltLabSuite/Core/Template.ts index 0270b9de88..4769360328 100644 --- a/wcfsetup/install/files/ts/WoltLabSuite/Core/Template.ts +++ b/wcfsetup/install/files/ts/WoltLabSuite/Core/Template.ts @@ -27,13 +27,12 @@ parser = new Parser();*/ class Template { constructor(template: string) { - // Fetch Language/StringUtil, as it cannot be provided because of a circular dependency if (Language === undefined) { - //@ts-ignore + // @ts-expect-error: This is required due to a circular dependency. Language = require("./Language"); } if (StringUtil === undefined) { - //@ts-ignore + // @ts-expect-error: This is required due to a circular dependency. StringUtil = require("./StringUtil"); }