From ceb7e48c99eb52beb98cdd5a68a2eadefdd2ef58 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Tue, 28 Nov 2023 00:12:23 +0100 Subject: [PATCH] Fix global declaration of staticRoot and webRoot These variables were intended to be globals declare in the global namespace. That this ends up on the window object is an implementation detail of JavaScript. Remove the window. prefix put in front of staticRoot and webRoot and include the global declaration in the TypeScript module. --- .eslintrc.js | 7 ++++++- packages/controller/web/index.html | 4 ++-- packages/web_ui/global.d.ts | 8 +++----- packages/web_ui/src/bootstrap.tsx | 6 +++--- packages/web_ui/src/components/App.tsx | 2 +- packages/web_ui/src/components/HostsPage.tsx | 2 +- packages/web_ui/src/components/ModPackViewPage.tsx | 2 +- packages/web_ui/src/components/ModsPage.tsx | 4 ++-- packages/web_ui/src/components/PluginViewPage.tsx | 2 +- packages/web_ui/src/components/PluginsPage.tsx | 2 +- packages/web_ui/src/components/SavesList.tsx | 4 ++-- packages/web_ui/src/index.ts | 1 + packages/web_ui/src/model/item_metadata.ts | 4 ++-- packages/web_ui/src/model/locale.ts | 2 +- 14 files changed, 27 insertions(+), 23 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 084deb91..2cee77d9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -22,6 +22,7 @@ module.exports = { "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/no-useless-constructor": "error", "@typescript-eslint/no-unused-vars": "off", + "@typescript-eslint/triple-slash-reference": "off", "prefer-const": "off", }, }, @@ -315,7 +316,11 @@ module.exports = { "space-in-parens": ["error", "never"], "space-infix-ops": "off", "space-unary-ops": "error", - "spaced-comment": ["error", "always"], + "spaced-comment": ["error", "always", { + "line": { + "markers": ["/"], + }, + }], "strict": "error", "switch-colon-spacing": "error", "symbol-description": "error", diff --git a/packages/controller/web/index.html b/packages/controller/web/index.html index fde58715..d8f6f318 100644 --- a/packages/controller/web/index.html +++ b/packages/controller/web/index.html @@ -20,8 +20,8 @@ }