fix(frontend): fix eslint errors

This commit is contained in:
Sam 2023-04-20 09:29:47 +02:00 committed by Gitea
parent d691d4b151
commit 70b4417128
9 changed files with 9 additions and 10 deletions

View File

@ -4,8 +4,8 @@
export let icon: string;
export let color: "primary" | "secondary" | "success" | "danger";
export let tooltip: string;
export let active: boolean = false;
export let disabled: boolean = false;
export let active = false;
export let disabled = false;
export let type: string | undefined = undefined;
export let id: string | undefined = undefined;

View File

@ -6,7 +6,7 @@ import type { MeUser } from "./api/entities";
const initialUserValue = null;
export const userStore = writable<MeUser | null>(initialUserValue);
let defaultThemeValue = "dark";
const defaultThemeValue = "dark";
const initialThemeValue = browser
? window.localStorage.getItem("pronouns-theme") ?? defaultThemeValue
: defaultThemeValue;

View File

@ -43,7 +43,7 @@
let bio: string | null;
$: bio = renderMarkdown(data.bio);
let memberPage: number = 0;
let memberPage = 0;
let memberSlice: PartialMember[] = [];
$: memberSlice = data.members.slice(memberPage * 20, (memberPage + 1) * 20);
const totalPages = Math.ceil(data.members.length / 20);

View File

@ -9,7 +9,7 @@
export let deleteField: () => void;
export let moveField: (up: boolean) => void;
let newEntry: string = "";
let newEntry = "";
const addEntry = (event: Event) => {
event.preventDefault();

View File

@ -3,7 +3,6 @@
import type { Pronoun, CustomPreference, CustomPreferences } from "$lib/api/entities";
import IconButton from "$lib/components/IconButton.svelte";
import {
Button,
ButtonDropdown,
Collapse,
DropdownItem,

View File

@ -31,7 +31,7 @@
let theme: string;
let currentUser: MeUser | null;
let showMenu: boolean = false;
let showMenu = false;
let isAdmin = false;
let numReports = 0;

View File

@ -1,7 +1,7 @@
<script lang="ts">
import type { Report } from "$lib/api/entities";
import { DateTime } from "luxon";
import { Button, Card, CardBody, CardFooter, CardHeader } from "sveltestrap";
import { Card, CardBody, CardFooter, CardHeader } from "sveltestrap";
export let report: Report;
</script>

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { APIError } from "$lib/api/entities";
import { apiFetchClient, fastFetchClient } from "$lib/api/fetch";
import { apiFetchClient } from "$lib/api/fetch";
import { DateTime } from "luxon";
import {
Button,

View File

@ -1,6 +1,6 @@
<script lang="ts">
import type { APIError } from "$lib/api/entities";
import { apiFetchClient, fastFetchClient } from "$lib/api/fetch";
import { fastFetchClient } from "$lib/api/fetch";
import ErrorAlert from "$lib/components/ErrorAlert.svelte";
import { addToast } from "$lib/toast";
import { DateTime } from "luxon";