From 55dd4c58eed5305fd2eacc02d2cbf6d2af74673b Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Fri, 8 Apr 2022 04:36:00 +0200 Subject: [PATCH] Some linting issues --- UI/AllThemesGui.ts | 2 +- all_themes_index.ts | 2 +- index.ts | 4 +--- package.json | 2 +- test.ts | 6 ++---- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/UI/AllThemesGui.ts b/UI/AllThemesGui.ts index eb5e738f1..cca64fd56 100644 --- a/UI/AllThemesGui.ts +++ b/UI/AllThemesGui.ts @@ -14,7 +14,7 @@ import {VariableUiElement} from "./Base/VariableUIElement"; import Svg from "../Svg"; export default class AllThemesGui { - constructor() { + setup() { try { new FixedUiElement("").AttachTo("centermessage") diff --git a/all_themes_index.ts b/all_themes_index.ts index 12abde8c5..058a2c3e5 100644 --- a/all_themes_index.ts +++ b/all_themes_index.ts @@ -19,4 +19,4 @@ if (layout !== "") { Utils.DisableLongPresses() document.getElementById("decoration-desktop").remove(); -new AllThemesGui(); \ No newline at end of file +new AllThemesGui().setup(); \ No newline at end of file diff --git a/index.ts b/index.ts index 58a0e54b7..ac7502261 100644 --- a/index.ts +++ b/index.ts @@ -26,7 +26,7 @@ class Init { if (layoutToUse === undefined) { // No layout found - new AllThemesGui() + new AllThemesGui().setup() return; } @@ -37,8 +37,6 @@ class Init { // @ts-ignore window.mapcomplete_state = State.state; new DefaultGUI(State.state, guiState) - - } } diff --git a/package.json b/package.json index df8aa0767..038b46def 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "gittag": "ts-node scripts/printVersion.ts | bash", "lint": "tslint --project . -c tslint.json '**.ts' ", "clean:tests": "(find . -type f -name \"*.doctest.ts\" | xargs rm)", - "clean": "rm -rf .cache/ && (find *.html | grep -v \"\\(404\\|index\\|land\\|test\\|preferences\\|customGenerator\\|professional\\|automaton\\|import_helper\\|import_viewer\\|theme\\).html\" | xargs rm) && (ls | grep \"^index_[a-zA-Z_]\\+\\.ts$\" | xargs rm) && (ls | grep \".*.webmanifest$\" | xargs rm)", + "clean": "rm -rf .cache/ && (find *.html | grep -v \"\\(404\\|index\\|land\\|test\\|preferences\\|customGenerator\\|professional\\|automaton\\|import_helper\\|import_viewer\\|theme\\).html\" | xargs rm) && (ls | grep \"^index_[a-zA-Z_-]\\+\\.ts$\" | xargs rm) && (ls | grep \".*.webmanifest$\" | xargs rm)", "generate:dependency-graph": "node_modules/.bin/depcruise --exclude \"^node_modules\" --output-type dot Logic/State/MapState.ts > dependencies.dot && dot dependencies.dot -T svg -o dependencies.svg && rm dependencies.dot", "script": "ts-node" }, diff --git a/test.ts b/test.ts index fdd7f691e..9a6b02f97 100644 --- a/test.ts +++ b/test.ts @@ -13,8 +13,7 @@ new Combine( try { inp = ValidatedTextField.ForType(key).ConstructInputElement({ feedback, - country: () => "be", - + country: () => "be" }); } catch (e) { console.error(e) @@ -29,5 +28,4 @@ new Combine( ]); } ) -).AttachTo("maindiv") - +).AttachTo("maindiv") \ No newline at end of file