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
+17 -16
View File
@@ -1,27 +1,26 @@
import { Button, type ButtonProps } from "@mantine/core";
import type { Meta, StoryObj } from "@storybook/react-vite";
import { Button, type ButtonProps } from "@mantine/core";
import { expect, fn, userEvent, within } from "storybook/test";
type ButtonStoryArgs = ButtonProps & { onClick: () => void };
type ButtonStoryArguments = ButtonProps & { onClick: () => void };
const meta = {
title: "Design System/Components/Button",
component: Button,
tags: ["autodocs"],
args: {
children: "Выполнить пример",
onClick: fn(),
loading: false,
disabled: false,
loading: false,
onClick: fn(),
variant: "filled",
},
argTypes: {
children: { control: "text" },
variant: { control: "select", options: ["filled", "default", "subtle"] },
loading: { control: "boolean" },
disabled: { control: "boolean" },
loading: { control: "boolean" },
onClick: { control: false },
variant: { control: "select", options: ["filled", "default", "subtle"] },
},
component: Button,
parameters: {
docs: {
description: {
@@ -30,13 +29,15 @@ const meta = {
},
},
},
} satisfies Meta<ButtonStoryArgs>;
tags: ["autodocs"],
title: "Design System/Components/Button",
} satisfies Meta<ButtonStoryArguments>;
export default meta;
type Story = StoryObj<ButtonStoryArgs>;
type Story = StoryObj<ButtonStoryArguments>;
export const Primary: Story = {
name: "Основное действие",
play: async ({ canvasElement, args }) => {
play: async ({ args, canvasElement }) => {
const button = within(canvasElement).getByRole("button", {
name: typeof args.children === "string" ? args.children : undefined,
});
@@ -47,12 +48,12 @@ export const Primary: Story = {
},
};
export const Secondary: Story = {
name: "Вторичное действие",
args: { variant: "default" },
name: "Вторичное действие",
};
export const Subtle: Story = {
name: "Вспомогательное действие",
args: { variant: "subtle" },
name: "Вспомогательное действие",
};
export const Loading: Story = { name: "Выполнение", args: { loading: true } };
export const Disabled: Story = { name: "Недоступно", args: { disabled: true } };
export const Loading: Story = { args: { loading: true }, name: "Выполнение" };
export const Disabled: Story = { args: { disabled: true }, name: "Недоступно" };