eslint update

This commit is contained in:
Athou
2023-12-28 19:54:51 +01:00
parent f4e48383cc
commit 97781d5551
65 changed files with 1258 additions and 3103 deletions

View File

@@ -2,12 +2,12 @@ import { Trans } from "@lingui/macro"
import { ActionIcon, Box, Code, Container, Group, Table, Text, Title, useMantineTheme } from "@mantine/core"
import { closeAllModals, openConfirmModal, openModal } from "@mantine/modals"
import { client, errorToStrings } from "app/client"
import { UserModel } from "app/types"
import { type UserModel } from "app/types"
import { UserEdit } from "components/admin/UserEdit"
import { Alert } from "components/Alert"
import { Loader } from "components/Loader"
import { RelativeDate } from "components/RelativeDate"
import { ReactNode } from "react"
import { type ReactNode } from "react"
import { useAsync, useAsyncCallback } from "react-async-hook"
import { TbCheck, TbPencil, TbPlus, TbTrash, TbX } from "react-icons/tb"
@@ -17,7 +17,7 @@ function BooleanIcon({ value }: { value: boolean }) {
export function AdminUsersPage() {
const theme = useMantineTheme()
const query = useAsync(() => client.admin.getAllUsers(), [])
const query = useAsync(async () => await client.admin.getAllUsers(), [])
const users = query.result?.data.sort((a, b) => a.id - b.id)
const deleteUser = useAsyncCallback(client.admin.deleteUser, {
@@ -56,7 +56,7 @@ export function AdminUsersPage() {
),
labels: { confirm: <Trans>Confirm</Trans>, cancel: <Trans>Cancel</Trans> },
confirmProps: { color: "red" },
onConfirm: () => deleteUser.execute({ id: user.id }),
onConfirm: async () => await deleteUser.execute({ id: user.id }),
})
}

View File

@@ -8,7 +8,7 @@ import { Timer } from "components/metrics/Timer"
import { useAsync } from "react-async-hook"
import { TbChartAreaLine, TbClock } from "react-icons/tb"
const shownMeters: { [key: string]: string } = {
const shownMeters: Record<string, string> = {
"com.commafeed.backend.feed.FeedRefreshEngine.refill": "Feed queue refill rate",
"com.commafeed.backend.feed.FeedRefreshWorker.feedFetched": "Feed fetching rate",
"com.commafeed.backend.feed.FeedRefreshUpdater.feedUpdated": "Feed update rate",
@@ -17,7 +17,7 @@ const shownMeters: { [key: string]: string } = {
"com.commafeed.backend.service.DatabaseCleaningService.entriesDeleted": "Entries deleted",
}
const shownGauges: { [key: string]: string } = {
const shownGauges: Record<string, string> = {
"com.commafeed.backend.feed.FeedRefreshEngine.queue.size": "Queue size",
"com.commafeed.backend.feed.FeedRefreshEngine.worker.active": "Feed Worker active",
"com.commafeed.backend.feed.FeedRefreshEngine.updater.active": "Feed Updater active",
@@ -26,7 +26,7 @@ const shownGauges: { [key: string]: string } = {
}
export function MetricsPage() {
const query = useAsync(() => client.admin.getMetrics(), [])
const query = useAsync(async () => await client.admin.getMetrics(), [])
if (!query.result) return <Loader />
const { meters, gauges, timers } = query.result.data