chore: finish frontend ESLint migration #18

Enable every plugin recommended preset and replace Biome with ESLint formatting.

Preserve API contracts and JSX whitespace; verify source, tests, builds and tooling.
This commit is contained in:
2026-09-28 16:36:40 +03:00
committed by ksv741
parent 57630102e4
commit 72d7835227
253 changed files with 10059 additions and 8864 deletions
+11 -10
View File
@@ -1,23 +1,24 @@
import { createContext, useContext } from "react";
import { createContext, use } from "react";
import type { paths } from "@/shared/api";
type User =
paths["/api/v1/auth/me"]["get"]["responses"][200]["content"]["application/json"];
type AuthContextValue = {
user: User | null;
accessToken: string | null;
ready: boolean;
accessToken: string | undefined;
login: (email: string, password: string) => Promise<void>;
register: (email: string, password: string) => Promise<void>;
logout: () => Promise<void>;
ready: boolean;
refresh: () => Promise<boolean>;
register: (email: string, password: string) => Promise<void>;
user: undefined | User;
};
const AuthContext = createContext<AuthContextValue | null>(null);
type User
= paths["/api/v1/auth/me"]["get"]["responses"][200]["content"]["application/json"];
const AuthContext = createContext<AuthContextValue | undefined>(undefined);
function useAuth() {
const context = useContext(AuthContext);
const context = use(AuthContext);
if (!context) throw new Error("AuthProvider is required");
return context;
}
export { AuthContext, type User, useAuth };
export { AuthContext, useAuth, type User };