linter formatting

This commit is contained in:
Conor_Mack 2020-05-26 10:19:04 +01:00
parent a9ef48e4ea
commit cff58f6a2d
7 changed files with 29 additions and 35 deletions

View File

@ -40,4 +40,3 @@ const apply_class = (id, name = "element", styles, selector) => {
return `.${name}-${id}${sel} {\n${styles}\n}`
}
}

View File

@ -40,10 +40,10 @@
styles = styles
}
$: stylesheetLinks = pipe(
$store.pages.stylesheets,
[map(s => `<link rel="stylesheet" href="${s}"/>`), join("\n")]
)
$: stylesheetLinks = pipe($store.pages.stylesheets, [
map(s => `<link rel="stylesheet" href="${s}"/>`),
join("\n"),
])
$: screensExist =
$store.currentPreviewItem._screens &&

View File

@ -16,15 +16,12 @@
const joinPath = join("/")
const normalizedName = name =>
pipe(
name,
[
pipe(name, [
trimCharsStart("./"),
trimCharsStart("~/"),
trimCharsStart("../"),
trimChars(" "),
]
)
])
const lastPartOfName = c => {
if (!c) return ""
@ -34,10 +31,10 @@
const isComponentSelected = (current, comp) => current === comp
$: _screens = pipe(
screens,
[map(c => ({ component: c, title: lastPartOfName(c) })), sortBy("title")]
)
$: _screens = pipe(screens, [
map(c => ({ component: c, title: lastPartOfName(c) })),
sortBy("title"),
])
const confirmDeleteComponent = component => {
componentToDelete = component

View File

@ -22,11 +22,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 moveDownComponent = component => {
const c = component

View File

@ -130,8 +130,10 @@ export const border = [
{ label: "Radius", key: "border-radius", control: Input },
{ label: "Width", key: "border-width", control: Input }, //custom
{
label: "Color", key: "border-color", control: OptionSelect,
options: ["black", "white", "red", "blue", "green"]
label: "Color",
key: "border-color",
control: OptionSelect,
options: ["black", "white", "red", "blue", "green"],
},
{ label: "Style", key: "border-style", control: Input },
]

View File

@ -169,7 +169,7 @@ export default {
icon: "ri-file-list-line",
properties: {
design: { ...all },
settings: []
settings: [],
},
},
],
@ -182,7 +182,7 @@ export default {
children: [],
properties: {
design: {
...all
...all,
},
settings: [
{ label: "Text", key: "text", control: Input },
@ -192,7 +192,7 @@ export default {
valueKey: "checked",
control: Checkbox,
},
]
],
},
},
{