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 icon: string;
export let color: "primary" | "secondary" | "success" | "danger"; export let color: "primary" | "secondary" | "success" | "danger";
export let tooltip: string; export let tooltip: string;
export let active: boolean = false; export let active = false;
export let disabled: boolean = false; export let disabled = false;
export let type: string | undefined = undefined; export let type: string | undefined = undefined;
export let id: string | undefined = undefined; export let id: string | undefined = undefined;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import type { APIError } from "$lib/api/entities"; 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 { DateTime } from "luxon";
import { import {
Button, Button,

View file

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