chore(frontend): add eslint quality gate

This commit is contained in:
cesnimda
2026-08-30 00:19:51 +02:00
parent 7318b02e11
commit a74daa7aa4
21 changed files with 3729 additions and 82 deletions
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from "react";
import React, { useCallback, useEffect, useState } from "react";
import {
Alert,
@@ -69,11 +69,11 @@ export default function TwoFactorSettingsCard() {
const [devicesLoading, setDevicesLoading] = useState(false);
const [devicesError, setDevicesError] = useState<string | null>(null);
const loadStatus = () => {
const loadStatus = useCallback(() => {
api.get<Status>("/auth/2fa/status").then((r) => setStatus(r.data)).catch(() => setStatus(null));
};
}, []);
const loadDevices = () => {
const loadDevices = useCallback(() => {
setDevicesLoading(true);
setDevicesError(null);
api
@@ -81,9 +81,9 @@ export default function TwoFactorSettingsCard() {
.then((r) => setDevices(r.data))
.catch((e) => setDevicesError(apiErrorMessage(e, t)))
.finally(() => setDevicesLoading(false));
};
}, [t]);
useEffect(() => { loadStatus(); loadDevices(); }, []);
useEffect(() => { loadStatus(); loadDevices(); }, [loadDevices, loadStatus]);
async function revokeDevice(id: number) {
try {