fix eslint errors
This commit is contained in:
parent
ebc10d9558
commit
55479ae8da
|
@ -17,4 +17,15 @@ module.exports = {
|
|||
es2017: true,
|
||||
node: true,
|
||||
},
|
||||
rules: {
|
||||
"no-unused-vars": "off",
|
||||
"@typescript-eslint/no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
argsIgnorePattern: "^_",
|
||||
destructuredArrayIgnorePattern: "^_",
|
||||
varsIgnorePattern: "^_",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable no-unused-vars */
|
||||
import { PUBLIC_BASE_URL, PUBLIC_MEDIA_URL } from "$env/static/public";
|
||||
|
||||
export const MAX_MEMBERS = 500;
|
||||
|
|
|
@ -31,6 +31,8 @@
|
|||
const resp = await apiFetchClient<Settings>(
|
||||
"/users/@me/settings",
|
||||
"PATCH",
|
||||
// If this function is run, notice will always be non-null
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
{ read_global_notice: data.notice!.id },
|
||||
2,
|
||||
);
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
import {
|
||||
Alert,
|
||||
Badge,
|
||||
Button,
|
||||
ButtonGroup,
|
||||
Icon,
|
||||
|
@ -15,7 +14,7 @@
|
|||
ModalFooter,
|
||||
Tooltip,
|
||||
} from "@sveltestrap/sveltestrap";
|
||||
import { DateTime, Duration, FixedOffsetZone, Zone } from "luxon";
|
||||
import { DateTime, FixedOffsetZone } from "luxon";
|
||||
import FieldCard from "$lib/components/FieldCard.svelte";
|
||||
import PronounLink from "$lib/components/PronounLink.svelte";
|
||||
import PartialMemberCard from "$lib/components/PartialMemberCard.svelte";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { PrideFlag, APIError, MeUser, PronounsJson } from "$lib/api/entities";
|
||||
import type { PrideFlag, MeUser, PronounsJson } from "$lib/api/entities";
|
||||
import { apiFetchClient } from "$lib/api/fetch";
|
||||
import { error, redirect, type Redirect } from "@sveltejs/kit";
|
||||
import { error, redirect } from "@sveltejs/kit";
|
||||
|
||||
import pronounsRaw from "$lib/pronouns.json";
|
||||
const pronouns = pronounsRaw as PronounsJson;
|
||||
|
|
|
@ -64,8 +64,10 @@
|
|||
) => Promise<void>;
|
||||
|
||||
let captchaToken = "";
|
||||
// svelte-hcaptcha doesn't have types, so we can't use anything except `any` here.
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
let captcha: any;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const captchaSuccess = (token: any) => {
|
||||
captchaToken = token.detail.token;
|
||||
};
|
||||
|
@ -88,6 +90,8 @@
|
|||
await fastFetch("/auth/force-delete", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
// We know for sure this value is non-null if this function is run at all
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
"X-Delete-Token": token!,
|
||||
},
|
||||
});
|
||||
|
@ -105,6 +109,8 @@
|
|||
await fastFetch("/auth/cancel-delete", {
|
||||
method: "GET",
|
||||
headers: {
|
||||
// We know for sure this value is non-null if this function is run at all
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
"X-Delete-Token": token!,
|
||||
},
|
||||
});
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
export let data: PageData;
|
||||
|
||||
let callbackPage: any;
|
||||
let callbackPage: CallbackPage;
|
||||
|
||||
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
||||
try {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
export let data: PageData;
|
||||
|
||||
let callbackPage: any;
|
||||
let callbackPage: CallbackPage;
|
||||
|
||||
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
||||
try {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
export let data: PageData;
|
||||
|
||||
let callbackPage: any;
|
||||
let callbackPage: CallbackPage;
|
||||
|
||||
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
||||
try {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
export let data: PageData;
|
||||
|
||||
let callbackPage: any;
|
||||
let callbackPage: CallbackPage;
|
||||
|
||||
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
||||
try {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
export let data: PageData;
|
||||
|
||||
let callbackPage: any;
|
||||
let callbackPage: CallbackPage;
|
||||
|
||||
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
||||
try {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<script lang="ts">
|
||||
// Ignoring the TS error here, because this file imports fine, typescript just chokes on markdown files
|
||||
// eslint-disable-next-line
|
||||
//@ts-ignore
|
||||
import { html } from "./about.md";
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<script lang="ts">
|
||||
import { onMount } from "svelte";
|
||||
// Ignoring the TS error here, because this file imports fine, typescript just chokes on markdown files
|
||||
// eslint-disable-next-line
|
||||
//@ts-ignore
|
||||
import { html } from "./changelog.md";
|
||||
import { CURRENT_CHANGELOG } from "$lib/store";
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<script lang="ts">
|
||||
// Ignoring the TS error here, because this file imports fine, typescript just chokes on markdown files
|
||||
// eslint-disable-next-line
|
||||
//@ts-ignore
|
||||
import { html } from "./privacy.md";
|
||||
</script>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<script lang="ts">
|
||||
// Ignoring the TS error here, because this file imports fine, typescript just chokes on markdown files
|
||||
// eslint-disable-next-line
|
||||
//@ts-ignore
|
||||
import { html } from "./terms.md";
|
||||
</script>
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
Table,
|
||||
} from "@sveltestrap/sveltestrap";
|
||||
import type { PageData } from "./$types";
|
||||
import { onMount } from "svelte";
|
||||
import { DateTime } from "luxon";
|
||||
|
||||
export let data: PageData;
|
||||
|
|
Loading…
Reference in New Issue