From 1f2c1a06aa7da9c878be5b18974488ecdc2d26fd Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 24 Jun 2020 16:12:55 +0100 Subject: [PATCH] lint :sparkles: --- packages/builder/src/App.svelte | 3 +-- .../src/builderStore/store/notifications.js | 15 +++++++++------ .../Notification/NotificationDisplay.svelte | 11 +++++++---- .../database/ModelDataTable/ModelDataTable.svelte | 6 ++---- .../nav/ModelSetupNav/ModelFieldEditor.svelte | 5 ++++- 5 files changed, 23 insertions(+), 17 deletions(-) diff --git a/packages/builder/src/App.svelte b/packages/builder/src/App.svelte index 76ef32a669..d10c04727f 100644 --- a/packages/builder/src/App.svelte +++ b/packages/builder/src/App.svelte @@ -4,11 +4,10 @@ import { Router, basepath } from "@sveltech/routify" import { routes } from "../routify/routes" import { store, initialise } from "builderStore" - import NotificationDisplay from "components/common/Notification/NotificationDisplay.svelte"; + import NotificationDisplay from "components/common/Notification/NotificationDisplay.svelte" $basepath = "/_builder" - diff --git a/packages/builder/src/builderStore/store/notifications.js b/packages/builder/src/builderStore/store/notifications.js index 201e13e4b9..85e708e92a 100644 --- a/packages/builder/src/builderStore/store/notifications.js +++ b/packages/builder/src/builderStore/store/notifications.js @@ -1,13 +1,16 @@ -import { writable } from 'svelte/store' +import { writable } from "svelte/store" import { generate } from "shortid" export const notificationStore = writable({ - notifications: [] + notifications: [], }) -export function send(message, type = 'default') { +export function send(message, type = "default") { notificationStore.update(state => { - state.notifications = [...state.notifications, { id: generate(), type, message }] + state.notifications = [ + ...state.notifications, + { id: generate(), type, message }, + ] return state }) } @@ -16,5 +19,5 @@ export const notifier = { danger: msg => send(msg, "danger"), warning: msg => send(msg, "warning"), info: msg => send(msg, "info"), - success: msg => send(msg, "success") -} \ No newline at end of file + success: msg => send(msg, "success"), +} diff --git a/packages/builder/src/components/common/Notification/NotificationDisplay.svelte b/packages/builder/src/components/common/Notification/NotificationDisplay.svelte index cfd39ad068..4abcffef57 100644 --- a/packages/builder/src/components/common/Notification/NotificationDisplay.svelte +++ b/packages/builder/src/components/common/Notification/NotificationDisplay.svelte @@ -16,17 +16,20 @@ $: if ($notificationStore.notifications.length) { setTimeout(() => { notificationStore.update(state => { - state.notifications.shift(); + state.notifications.shift() state.notifications = state.notifications - return state; + return state }) }, timeout) - } + }
    {#each $notificationStore.notifications as notification (notification.id)} -
  • +
  • {notification.message}
    {#if notification.icon} diff --git a/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte b/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte index 896d3c39b7..d10c56799b 100644 --- a/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte +++ b/packages/builder/src/components/database/ModelDataTable/ModelDataTable.svelte @@ -132,11 +132,9 @@ {#each headers as header} - {#if schema[header].type === "link"} + {#if schema[header].type === 'link'} - {:else} - {row[header]} - {/if} + {:else}{row[header]}{/if} {/each} diff --git a/packages/builder/src/components/nav/ModelSetupNav/ModelFieldEditor.svelte b/packages/builder/src/components/nav/ModelSetupNav/ModelFieldEditor.svelte index d8af2b19cf..d9a61508b3 100644 --- a/packages/builder/src/components/nav/ModelSetupNav/ModelFieldEditor.svelte +++ b/packages/builder/src/components/nav/ModelSetupNav/ModelFieldEditor.svelte @@ -78,7 +78,10 @@ {:else if field.type === 'link'}
    -