forked from mirrors/pronouns.cc
fix eslint errors
This commit is contained in:
parent
ebc10d9558
commit
55479ae8da
16 changed files with 37 additions and 11 deletions
|
@ -17,4 +17,15 @@ module.exports = {
|
||||||
es2017: true,
|
es2017: true,
|
||||||
node: 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";
|
import { PUBLIC_BASE_URL, PUBLIC_MEDIA_URL } from "$env/static/public";
|
||||||
|
|
||||||
export const MAX_MEMBERS = 500;
|
export const MAX_MEMBERS = 500;
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
const resp = await apiFetchClient<Settings>(
|
const resp = await apiFetchClient<Settings>(
|
||||||
"/users/@me/settings",
|
"/users/@me/settings",
|
||||||
"PATCH",
|
"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 },
|
{ read_global_notice: data.notice!.id },
|
||||||
2,
|
2,
|
||||||
);
|
);
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Alert,
|
Alert,
|
||||||
Badge,
|
|
||||||
Button,
|
Button,
|
||||||
ButtonGroup,
|
ButtonGroup,
|
||||||
Icon,
|
Icon,
|
||||||
|
@ -15,7 +14,7 @@
|
||||||
ModalFooter,
|
ModalFooter,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from "@sveltestrap/sveltestrap";
|
} from "@sveltestrap/sveltestrap";
|
||||||
import { DateTime, Duration, FixedOffsetZone, Zone } from "luxon";
|
import { DateTime, FixedOffsetZone } from "luxon";
|
||||||
import FieldCard from "$lib/components/FieldCard.svelte";
|
import FieldCard from "$lib/components/FieldCard.svelte";
|
||||||
import PronounLink from "$lib/components/PronounLink.svelte";
|
import PronounLink from "$lib/components/PronounLink.svelte";
|
||||||
import PartialMemberCard from "$lib/components/PartialMemberCard.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 { 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";
|
import pronounsRaw from "$lib/pronouns.json";
|
||||||
const pronouns = pronounsRaw as PronounsJson;
|
const pronouns = pronounsRaw as PronounsJson;
|
||||||
|
|
|
@ -64,8 +64,10 @@
|
||||||
) => Promise<void>;
|
) => Promise<void>;
|
||||||
|
|
||||||
let captchaToken = "";
|
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;
|
let captcha: any;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
const captchaSuccess = (token: any) => {
|
const captchaSuccess = (token: any) => {
|
||||||
captchaToken = token.detail.token;
|
captchaToken = token.detail.token;
|
||||||
};
|
};
|
||||||
|
@ -88,6 +90,8 @@
|
||||||
await fastFetch("/auth/force-delete", {
|
await fastFetch("/auth/force-delete", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
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!,
|
"X-Delete-Token": token!,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
@ -105,6 +109,8 @@
|
||||||
await fastFetch("/auth/cancel-delete", {
|
await fastFetch("/auth/cancel-delete", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
headers: {
|
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!,
|
"X-Delete-Token": token!,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
|
||||||
let callbackPage: any;
|
let callbackPage: CallbackPage;
|
||||||
|
|
||||||
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
|
||||||
let callbackPage: any;
|
let callbackPage: CallbackPage;
|
||||||
|
|
||||||
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
|
||||||
let callbackPage: any;
|
let callbackPage: CallbackPage;
|
||||||
|
|
||||||
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
|
||||||
let callbackPage: any;
|
let callbackPage: CallbackPage;
|
||||||
|
|
||||||
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
|
||||||
let callbackPage: any;
|
let callbackPage: CallbackPage;
|
||||||
|
|
||||||
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
const signupForm = async (username: string, invite: string, captchaToken: string) => {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<script lang="ts">
|
<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
|
//@ts-ignore
|
||||||
import { html } from "./about.md";
|
import { html } from "./about.md";
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount } from "svelte";
|
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
|
//@ts-ignore
|
||||||
import { html } from "./changelog.md";
|
import { html } from "./changelog.md";
|
||||||
import { CURRENT_CHANGELOG } from "$lib/store";
|
import { CURRENT_CHANGELOG } from "$lib/store";
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<script lang="ts">
|
<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
|
//@ts-ignore
|
||||||
import { html } from "./privacy.md";
|
import { html } from "./privacy.md";
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<script lang="ts">
|
<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
|
//@ts-ignore
|
||||||
import { html } from "./terms.md";
|
import { html } from "./terms.md";
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
Table,
|
Table,
|
||||||
} from "@sveltestrap/sveltestrap";
|
} from "@sveltestrap/sveltestrap";
|
||||||
import type { PageData } from "./$types";
|
import type { PageData } from "./$types";
|
||||||
import { onMount } from "svelte";
|
|
||||||
import { DateTime } from "luxon";
|
import { DateTime } from "luxon";
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
|
Loading…
Reference in a new issue