chore: 迁移 lint/format 工具链 ESLint+Prettier → oxlint+oxfmt

This commit is contained in:
2026-06-06 00:57:55 +08:00
parent 3f88e33bd1
commit 121c6f764f
45 changed files with 625 additions and 1004 deletions

View File

@@ -1,4 +1,4 @@
/* eslint-disable @typescript-eslint/require-await */
/* oxlint-disable typescript/require-await */
import { afterEach, describe, expect, test } from "bun:test";
import { mkdirSync } from "node:fs";
import { tmpdir } from "node:os";

View File

@@ -1,5 +1,5 @@
import { screen } from "@testing-library/react";
import { describe, expect, test } from "bun:test";
import { screen } from "@testing-library/react";
import { createElement } from "react";
import { APP } from "../../src/shared/app";

View File

@@ -1,5 +1,5 @@
import { fireEvent } from "@testing-library/react";
import { describe, expect, it, vi } from "bun:test";
import { fireEvent } from "@testing-library/react";
import { createElement } from "react";
import { FilterToolbar } from "../../src/web/shared/components/FilterToolbar";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, expect, test, vi } from "bun:test";
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import type { Model, Project } from "../../../src/shared/api";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, expect, mock, test } from "bun:test";
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import type { Conversation, Model } from "../../../src/shared/api";

View File

@@ -1,5 +1,5 @@
import { screen } from "@testing-library/react";
import { describe, expect, test } from "bun:test";
import { screen } from "@testing-library/react";
import { createElement } from "react";
import { ConsoleShell } from "../../../src/web/shared/components/ConsoleShell/ConsoleShell";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, expect, test, vi } from "bun:test";
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import type { Conversation } from "../../../src/shared/api";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, expect, test, vi } from "bun:test";
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import type { Conversation } from "../../../src/shared/api";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, expect, test, vi } from "bun:test";
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import { ConversationSidebar } from "../../../src/web/features/chat/components/ConversationSidebar";

View File

@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test";
import { fireEvent, render, screen } from "@testing-library/react";
import { App as AntApp, ConfigProvider } from "antd";
import { describe, expect, test } from "bun:test";
import { createElement } from "react";
import { ErrorBoundary } from "../../../src/web/shared/components/ErrorBoundary";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, expect, mock, test } from "bun:test";
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import type { Model, Provider, ProviderOption } from "../../../src/shared/api";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen } from "@testing-library/react";
import { describe, expect, test } from "bun:test";
import { fireEvent, screen } from "@testing-library/react";
import { createElement } from "react";
import { useLocation } from "react-router";

View File

@@ -1,5 +1,5 @@
import { screen, waitFor } from "@testing-library/react";
import { describe, expect, mock, test } from "bun:test";
import { screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import { renderWithProviders } from "../../test-utils";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen } from "@testing-library/react";
import { describe, expect, test } from "bun:test";
import { fireEvent, screen } from "@testing-library/react";
import { createElement } from "react";
import { ReasoningPart } from "../../../../src/web/features/chat/parts/ReasoningPart";

View File

@@ -1,5 +1,5 @@
import { screen } from "@testing-library/react";
import { describe, expect, test } from "bun:test";
import { screen } from "@testing-library/react";
import { createElement } from "react";
import { TextPart } from "../../../../src/web/features/chat/parts/TextPart";

View File

@@ -1,5 +1,5 @@
import { screen } from "@testing-library/react";
import { describe, expect, test } from "bun:test";
import { screen } from "@testing-library/react";
import { createElement } from "react";
import { ToolPart } from "../../../../src/web/features/chat/parts/ToolPart";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, expect, test, vi } from "bun:test";
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import type { CreateMaterialRequest, Material } from "../../../../src/shared/api";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, expect, test } from "bun:test";
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import type { Project } from "../../../../src/shared/api";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, expect, test, vi } from "bun:test";
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import type { Material } from "../../../../src/shared/api";

View File

@@ -1,5 +1,5 @@
import { screen } from "@testing-library/react";
import { describe, expect, test, vi } from "bun:test";
import { screen } from "@testing-library/react";
import { createElement } from "react";
import type { Material } from "../../../../src/shared/api";

View File

@@ -1,5 +1,5 @@
import { screen, waitFor } from "@testing-library/react";
import { describe, expect, test } from "bun:test";
import { screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import { SettingsPage } from "../../../../src/web/features/settings/index";

View File

@@ -1,7 +1,7 @@
import type { UIMessage } from "ai";
import { act, renderHook } from "@testing-library/react";
import { describe, expect, mock, test } from "bun:test";
import { act, renderHook } from "@testing-library/react";
import { useChatScroll } from "../../../src/web/features/chat/use-chat-scroll";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen } from "@testing-library/react";
import { describe, expect, test } from "bun:test";
import { fireEvent, screen } from "@testing-library/react";
import { createElement } from "react";
import { useLocation } from "react-router";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, expect, mock, test } from "bun:test";
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import type { Model, Provider } from "../../../src/shared/api";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, expect, mock, test } from "bun:test";
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import { useLocation } from "react-router";

View File

@@ -1,5 +1,5 @@
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { describe, expect, test } from "bun:test";
import { fireEvent, screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import type { Provider } from "../../../src/shared/api";

View File

@@ -1,5 +1,5 @@
import { screen, waitFor } from "@testing-library/react";
import { describe, expect, test } from "bun:test";
import { screen, waitFor } from "@testing-library/react";
import { createElement } from "react";
import { App } from "../../../src/web/app";

View File

@@ -1,8 +1,8 @@
import { mock } from "bun:test";
import { XProvider } from "@ant-design/x";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { render } from "@testing-library/react";
import { App } from "antd";
import { mock } from "bun:test";
import { createElement, StrictMode } from "react";
import { MemoryRouter } from "react-router";

View File

@@ -1,7 +1,7 @@
import { describe, expect, it } from "bun:test";
import { XProvider } from "@ant-design/x";
import { act, renderHook } from "@testing-library/react";
import { App } from "antd";
import { describe, expect, it } from "bun:test";
import { createElement } from "react";
import { useConfirmAction } from "../../src/web/shared/hooks/useConfirmAction";

View File

@@ -1,5 +1,5 @@
import { act, renderHook } from "@testing-library/react";
import { describe, expect, it } from "bun:test";
import { act, renderHook } from "@testing-library/react";
import { createElement } from "react";
import { MemoryRouter, Route, Routes } from "react-router";