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 -8
View File
@@ -1,6 +1,9 @@
import { expect, it } from "vitest";
import { type BankSummary, sortBankSummary } from "./queries";
const money = (value: string) => ({ currency: "RUB", value });
it("orders displayed expenses descending, preserving cents, ties and source data", () => {
const values = [
"-10",
@@ -10,23 +13,23 @@ it("orders displayed expenses descending, preserving cents, ties and source data
"-2",
"0",
];
const money = (value: string) => ({ currency: "RUB", value });
const data: BankSummary = {
month: "2026-09",
cardId: "a",
expenses: money("0"),
refunds: money("0"),
net: money("0"),
categories: values.map((value, index) => ({
categoryId: String(index),
categoryName: String(index),
expenses: money("100"),
refunds: money("0"),
net: money(value),
refunds: money("0"),
})),
expenses: money("0"),
month: "2026-09",
net: money("0"),
refunds: money("0"),
};
expect(sortBankSummary(data).categories.map((row) => row.categoryId)).toEqual(
expect(sortBankSummary(data).categories.map(row => row.categoryId)).toEqual(
["3", "1", "2", "5", "4", "0"],
);
expect(data.categories.map((row) => row.net.value)).toEqual(values);
expect(data.categories.map(row => row.net.value)).toEqual(values);
});