From 569f6db40b832e261f7963f2e691f717cdd454e4 Mon Sep 17 00:00:00 2001 From: Tobias Berger Date: Thu, 30 Sep 2021 21:26:11 +0200 Subject: [PATCH] Change prettier config --- .prettierrc | 3 ++ public/index.html | 29 +++-------- src/App.svelte | 10 +--- src/components/Header.svelte | 6 +-- src/components/Log.svelte | 6 +-- src/components/Modals/SettingsModal.svelte | 14 ++---- .../ResourceTable/ResourceGroup.svelte | 6 +-- src/components/Tabs/Home.svelte | 9 +--- src/components/Wrapper.svelte | 18 ++----- src/shark/LZString.ts | 33 +++---------- src/shark/Log.ts | 9 +--- src/shark/SaveHandler.ts | 29 +++-------- src/shark/Settings.ts | 23 ++------- src/shark/SharkGame.ts | 5 +- src/shark/TabHandler.ts | 3 +- src/shark/data/HomeActions.ts | 14 ++---- src/shark/data/Resources.ts | 11 ++--- src/styles/themes.scss | 49 +++---------------- 18 files changed, 58 insertions(+), 219 deletions(-) diff --git a/.prettierrc b/.prettierrc index e69de29..963354f 100644 --- a/.prettierrc +++ b/.prettierrc @@ -0,0 +1,3 @@ +{ + "printWidth": 120 +} diff --git a/public/index.html b/public/index.html index c891c58..3dac725 100644 --- a/public/index.html +++ b/public/index.html @@ -16,16 +16,9 @@ --> - + - + - - + + @@ -69,13 +56,9 @@

Shark Game??

Oh dear! It seems you have Javascript disabled, or that your current - browser does not support scripts. - Shark Game requires scripts to work. Otherwise it's just a static - webpage that doesn't do much.Oh dear! It seems you have Javascript disabled, or that your current browser does not support scripts. + Shark Game requires scripts to work. Otherwise it's just a static webpage that doesn't do much. In fact, it only displays this Shark asking you for scripts.
diff --git a/src/App.svelte b/src/App.svelte
index 43ec107..5895184 100644
--- a/src/App.svelte
+++ b/src/App.svelte
@@ -17,15 +17,9 @@
     root = document.documentElement;
 
     SharkGame.Settings.settings.subscribe((settings) => {
-      root.classList.toggle(
-        "no-theme",
-        !settings.appearance.enableThemes.current
-      );
+      root.classList.toggle("no-theme", !settings.appearance.enableThemes.current);
       settings.appearance.theme.options.forEach((theme) => {
-        root.classList.toggle(
-          theme,
-          theme === settings.appearance.theme.current
-        );
+        root.classList.toggle(theme, theme === settings.appearance.theme.current);
       });
     });
   });
diff --git a/src/components/Header.svelte b/src/components/Header.svelte
index 6ca3334..46440b6 100644
--- a/src/components/Header.svelte
+++ b/src/components/Header.svelte
@@ -14,11 +14,7 @@
       game.SaveHandler.save(game);
     },
     settings() {
-      openModal(
-        SettingsModal,
-        { settings: game.Settings.settings },
-        { replace: true }
-      );
+      openModal(SettingsModal, { settings: game.Settings.settings }, { replace: true });
     },
     help() {
       console.log("help");
diff --git a/src/components/Log.svelte b/src/components/Log.svelte
index 6a9c764..448c86e 100644
--- a/src/components/Log.svelte
+++ b/src/components/Log.svelte
@@ -6,11 +6,7 @@
   import type { Writable } from "svelte/store";
   import { slide } from "svelte/transition";
 
-  import type {
-    AddMessageEvent,
-    ResetMessagesEvent,
-    Message,
-  } from "../shark/Message";
+  import type { AddMessageEvent, ResetMessagesEvent, Message } from "../shark/Message";
   import { MessageType } from "../shark/Message";
 
   export let messages: Writable;
diff --git a/src/components/Modals/SettingsModal.svelte b/src/components/Modals/SettingsModal.svelte
index 0b8357b..68021a6 100644
--- a/src/components/Modals/SettingsModal.svelte
+++ b/src/components/Modals/SettingsModal.svelte
@@ -14,18 +14,10 @@
       

{categoryName.toUpperCase()}

{#each Object.entries(categorySettings) as [settingId, setting] (settingId)} -
-
+
+
{setting.name}
- ({setting.description}) + ({setting.description})
{#each setting.options as option}