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
+13 -12
View File
@@ -1,6 +1,7 @@
import { MantineProvider } from "@mantine/core";
import { fireEvent, render, screen } from "@testing-library/react";
import { assert, describe, expect, it } from "vitest";
import { EntryCard } from "./EntryCard";
describe("EntryCard", () => {
@@ -8,13 +9,13 @@ describe("EntryCard", () => {
render(
<MantineProvider>
<EntryCard
title="Пример"
metadata="Описание"
actions={0}
initial="У"
metadata="Описание"
title="Пример"
tone="neutral"
value="—"
valueLabel="Неизвестно"
tone="neutral"
actions={0}
/>
</MantineProvider>,
);
@@ -22,21 +23,21 @@ describe("EntryCard", () => {
});
it("keeps a failed image fallback until a new source is supplied", () => {
const props = {
title: "Пример",
metadata: "Описание",
imageSrc: "data:image/png;base64,invalid",
initial: "У",
metadata: "Описание",
title: "Пример",
tone: "neutral" as const,
value: "—",
valueLabel: "Неизвестно",
tone: "neutral" as const,
imageSrc: "data:image/png;base64,invalid",
};
const { container, rerender } = render(
const { rerender } = render(
<MantineProvider>
<EntryCard {...props} />
</MantineProvider>,
);
// Decorative image has no accessible name; trigger its actual failure event.
const image = container.querySelector("img");
const image = screen.queryByAltText("");
assert(image);
fireEvent.error(image);
rerender(
@@ -44,7 +45,7 @@ describe("EntryCard", () => {
<EntryCard {...props} title="Обновлённый пример" />
</MantineProvider>,
);
expect(container.querySelector("img")).toBeNull();
expect(screen.queryByAltText("")).not.toBeInTheDocument();
expect(screen.getByText("У")).toBeInTheDocument();
expect(screen.getByText("Обновлённый пример")).toBeInTheDocument();
rerender(
@@ -52,7 +53,7 @@ describe("EntryCard", () => {
<EntryCard {...props} imageSrc="/replacement-logo.png" />
</MantineProvider>,
);
expect(container.querySelector("img")).toHaveAttribute(
expect(screen.queryByAltText("")).toHaveAttribute(
"src",
"/replacement-logo.png",
);