From 93e78c2336b1ab09faa193732ffaa24b4e88afc2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 30 Oct 2020 11:12:08 +0100 Subject: [PATCH] Make everything @typescript-eslint/ban-ts-comment clean --- wcfsetup/install/files/js/WoltLabSuite/Core/Language.js | 3 +-- wcfsetup/install/files/js/WoltLabSuite/Core/StringUtil.js | 4 ++-- wcfsetup/install/files/js/WoltLabSuite/Core/Template.js | 5 ++--- wcfsetup/install/files/ts/WoltLabSuite/Core/Language.ts | 3 +-- wcfsetup/install/files/ts/WoltLabSuite/Core/StringUtil.ts | 4 ++-- wcfsetup/install/files/ts/WoltLabSuite/Core/Template.ts | 5 ++--- 6 files changed, 10 insertions(+), 14 deletions(-) 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"); } -- 2.20.1