From 355ba80ebefc5830e5085a4a0383571852adc6d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Ml=C3=A1dek?= Date: Sun, 30 Jan 2022 16:50:23 +0100 Subject: [PATCH] [webui] lint fixes --- webui/.eslintrc.json | 4 +++- webui/src/components/AttributeView.svelte | 2 +- webui/src/components/DropPasteHandler.svelte | 6 +++--- webui/src/components/display/UpObjectCard.svelte | 4 ---- webui/src/components/layout/Header.svelte | 2 +- webui/src/components/layout/Jobs.svelte | 2 +- webui/src/components/utils/Ellipsis.svelte | 5 +---- webui/src/components/utils/Selector.svelte | 2 +- webui/src/components/widgets/Table.svelte | 4 +--- webui/src/views/Search.svelte | 2 +- 10 files changed, 13 insertions(+), 20 deletions(-) diff --git a/webui/.eslintrc.json b/webui/.eslintrc.json index cc9578d..cabcbdf 100644 --- a/webui/.eslintrc.json +++ b/webui/.eslintrc.json @@ -16,7 +16,9 @@ "processor": "svelte3/svelte3" } ], - "rules": {}, + "rules": { + "@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }] + }, "settings": { "svelte3/typescript": true // load TypeScript as peer dependency } diff --git a/webui/src/components/AttributeView.svelte b/webui/src/components/AttributeView.svelte index 01c1b89..18f1442 100644 --- a/webui/src/components/AttributeView.svelte +++ b/webui/src/components/AttributeView.svelte @@ -39,7 +39,7 @@ $: { components = availableWidgets.find( (w) => w.name === currentWidget - )!.components; + ).components; } diff --git a/webui/src/components/DropPasteHandler.svelte b/webui/src/components/DropPasteHandler.svelte index ca3e3d5..79e1f78 100644 --- a/webui/src/components/DropPasteHandler.svelte +++ b/webui/src/components/DropPasteHandler.svelte @@ -11,15 +11,15 @@ dragging = false; } - function onDragEnter(ev: DragEvent) { + function onDragEnter() { // noop } - function onDragOver(ev: DragEvent) { + function onDragOver() { dragging = true; } - function onDragLeave(ev: DragEvent) { + function onDragLeave() { dragging = false; } diff --git a/webui/src/components/display/UpObjectCard.svelte b/webui/src/components/display/UpObjectCard.svelte index 5d32e8b..33fa580 100644 --- a/webui/src/components/display/UpObjectCard.svelte +++ b/webui/src/components/display/UpObjectCard.svelte @@ -1,12 +1,8 @@ -
+
{valueStart}
{valueEnd}
diff --git a/webui/src/components/utils/Selector.svelte b/webui/src/components/utils/Selector.svelte index 7fdfc92..2f01ef1 100644 --- a/webui/src/components/utils/Selector.svelte +++ b/webui/src/components/utils/Selector.svelte @@ -74,7 +74,7 @@ } options.push( - ...objects.slice(0, 25).map(([address, label]) => { + ...objects.slice(0, 25).map(([address, _]) => { return { value: { t: "Address", diff --git a/webui/src/components/widgets/Table.svelte b/webui/src/components/widgets/Table.svelte index b97e76c..33e317c 100644 --- a/webui/src/components/widgets/Table.svelte +++ b/webui/src/components/widgets/Table.svelte @@ -3,10 +3,8 @@ import { format, fromUnixTime } from "date-fns"; import Ellipsis from "../utils/Ellipsis.svelte"; import UpObject from "../display/UpObject.svelte"; - import { createEventDispatcher, getContext } from "svelte"; + import { createEventDispatcher } from "svelte"; import type { AttributeChange, AttributeUpdate } from "../../types/base"; - import { useParams } from "svelte-navigator"; - import type { Writable } from "svelte/store"; import type { UpEntry } from "upend"; import IconButton from "../utils/IconButton.svelte"; import Selector from "../utils/Selector.svelte"; diff --git a/webui/src/views/Search.svelte b/webui/src/views/Search.svelte index 6c552d5..042f231 100644 --- a/webui/src/views/Search.svelte +++ b/webui/src/views/Search.svelte @@ -1,7 +1,7 @@