From 9e978019aa068bf867b52316193f05d178ed44e6 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 27 Jul 2020 16:12:06 +0100 Subject: [PATCH] lint --- .../userInterface/ComponentsHierarchy.svelte | 15 ++++++--------- .../ComponentsHierarchyChildren.svelte | 6 +----- packages/server/src/api/controllers/component.js | 1 + 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte index 60311021f8..b4dfc9cc7d 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchy.svelte @@ -16,15 +16,12 @@ const joinPath = join("/") const normalizedName = name => - pipe( - name, - [ - trimCharsStart("./"), - trimCharsStart("~/"), - trimCharsStart("../"), - trimChars(" "), - ] - ) + pipe(name, [ + trimCharsStart("./"), + trimCharsStart("~/"), + trimCharsStart("../"), + trimChars(" "), + ]) const changeScreen = screen => { store.setCurrentScreen(screen.props._instanceName) diff --git a/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte b/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte index d827a88f86..691d188b07 100644 --- a/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte +++ b/packages/builder/src/components/userInterface/ComponentsHierarchyChildren.svelte @@ -19,11 +19,7 @@ const capitalise = s => s.substring(0, 1).toUpperCase() + s.substring(1) const get_name = s => (!s ? "" : last(s.split("/"))) - const get_capitalised_name = name => - pipe( - name, - [get_name, capitalise] - ) + const get_capitalised_name = name => pipe(name, [get_name, capitalise]) const isScreenslot = name => name === "##builtin/screenslot" const selectComponent = component => { diff --git a/packages/server/src/api/controllers/component.js b/packages/server/src/api/controllers/component.js index 3d631bcaec..996ad21930 100644 --- a/packages/server/src/api/controllers/component.js +++ b/packages/server/src/api/controllers/component.js @@ -27,6 +27,7 @@ exports.fetchAppComponentDefinitions = async function(ctx) { const componentJson = require(join( appDirectory, componentLibrary, + ctx.isDev ? "" : "packages", "components.json" ))