diff --git a/.prettierrc b/.prettierrc index f83848a8..188b944a 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,5 +1,5 @@ { - "arrowParens": "always", + "arrowParens": "avoid", "tabWidth": 2, "semi": false, "singleQuote": true, diff --git a/src/lib/components/lemmy/comment/Comments.svelte b/src/lib/components/lemmy/comment/Comments.svelte index 0a7f905b..c2fbeb7c 100644 --- a/src/lib/components/lemmy/comment/Comments.svelte +++ b/src/lib/components/lemmy/comment/Comments.svelte @@ -73,7 +73,7 @@ // 0.18.2 -> 0.18.3 broke this // so i'm adding this check const treeParent = tree.find( - (c) => c.comment_view.comment.id == parent.comment_view.comment.id, + c => c.comment_view.comment.id == parent.comment_view.comment.id, ) if (treeParent) { @@ -121,7 +121,7 @@ node.comment_view.counts.child_count > 0 ? 'border-l' : ''} ml-2.5 border-slate-200 dark:border-zinc-800 pl-2.5 " - bind:open={(() => node.expanded, (value) => (node.expanded = value))} + bind:open={() => node.expanded, value => (node.expanded = value)} > {#if node.children?.length > 0} diff --git a/src/routes/admin/config/+page.svelte b/src/routes/admin/config/+page.svelte index b49f4dda..05448ca4 100644 --- a/src/routes/admin/config/+page.svelte +++ b/src/routes/admin/config/+page.svelte @@ -76,7 +76,7 @@
{ + onsubmit={e => { e.preventDefault() save() }} @@ -84,24 +84,26 @@
{$t('routes.admin.config.title')}
{#if formData} formData.name ?? '', - (v) => (formData.description = v))} + bind:value={() => formData.name ?? '', v => (formData.description = v)} label={$t('form.name')} /> formData.description ?? '', - (v) => (formData.description = v))} + bind:value={ + () => formData.description ?? '', v => (formData.description = v) + } label={$t('form.description')} /> formData.sidebar ?? '', (v) => (formData.sidebar = v))} + bind:value={() => formData.sidebar ?? '', v => (formData.sidebar = v)} label={$t('routes.admin.config.sidebar')} /> formData.legal_information ?? '', - (v) => (formData.legal_information = v))} + bind:value={ + () => formData.legal_information ?? '', + v => (formData.legal_information = v) + } label={$t('routes.legal.title')} />
@@ -125,7 +127,7 @@ { + onupload={uploaded => { uploading.icon = false formData.icon = uploaded[0] }} @@ -153,7 +155,7 @@ { + onupload={uploaded => { uploading.banner = false formData.banner = uploaded[0] }} @@ -255,7 +257,7 @@ {/snippet} - {#each site.data.all_languages.filter((l) => !formData.discussion_languages?.includes(l.id)) as language, index} + {#each site.data.all_languages.filter(l => !formData.discussion_languages?.includes(l.id)) as language, index} { @@ -268,7 +270,7 @@ {#each formData.discussion_languages ?? [] as languageId, index} {@const language = site.data.all_languages.find( - (l) => l.id == languageId, + l => l.id == languageId, )} {/snippet} - {#each site.data.all_languages.filter((l) => !formData.discussion_languages?.includes(l.id)) as language, index} + {#each site.data.all_languages.filter(l => !formData.discussion_languages?.includes(l.id)) as language, index} { @@ -155,7 +155,7 @@ {#each formData.discussion_languages as languageId, index} {@const language = site.data.all_languages.find( - (l) => l.id == languageId, + l => l.id == languageId, )}