fix: fix all eslint errors
This commit is contained in:
parent
1cf2619393
commit
39a3098a99
19 changed files with 420 additions and 412 deletions
|
@ -10,7 +10,7 @@ export default function createCallbackLoader(
|
|||
bodyFn?: (event: ServerLoadEvent) => Promise<unknown>,
|
||||
) {
|
||||
return async (event: ServerLoadEvent) => {
|
||||
const { url, parent, fetch, cookies } = event;
|
||||
const { parent, fetch, cookies } = event;
|
||||
|
||||
bodyFn ??= async ({ url }) => {
|
||||
const code = url.searchParams.get("code") as string | null;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
export default class ApiError {
|
||||
raw?: RawApiError;
|
||||
code: ErrorCode;
|
||||
|
|
|
@ -23,7 +23,7 @@ export type RequestArgs = {
|
|||
/**
|
||||
* The body for this request, which will be serialized to JSON. Should be a plain JS object.
|
||||
*/
|
||||
body?: any;
|
||||
body?: unknown;
|
||||
/**
|
||||
* The fetch function to use. Should be passed in loader and action functions, but can be safely ignored for client-side requests.
|
||||
*/
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
{#if value !== ""}
|
||||
<div class="card">
|
||||
<div class="card-header">{$t("edit-profile.preview")}</div>
|
||||
<!-- bios are sanitized before being passed to @html and the allowed markdown is heavily restricted -->
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
<div class="card-body">{@html renderMarkdown(value)}</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
{/if}
|
||||
{#if bio}
|
||||
<hr />
|
||||
<!-- bios are sanitized before being passed to @html and the allowed markdown is heavily restricted -->
|
||||
<!-- eslint-disable-next-line svelte/no-at-html-tags -->
|
||||
<p>{@html bio}</p>
|
||||
{/if}
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { ErrorCode } from "$api/error";
|
||||
import type { Modifier } from "sveltekit-i18n";
|
||||
|
||||
// eslint-disable-next-line
|
||||
type TranslateFn = (key: string, payload?: any, props?: Modifier.Props<{}> | undefined) => any;
|
||||
|
||||
export default function errorDescription(t: TranslateFn, code: ErrorCode): string {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { PUBLIC_LANGUAGE } from "$env/static/public";
|
||||
import i18n, { type Config } from "sveltekit-i18n";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const config: Config<any> = {
|
||||
initLocale: PUBLIC_LANGUAGE,
|
||||
fallbackLocale: "en",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue