From af026104097fe385dbe222b1db2a31d67b873d9c Mon Sep 17 00:00:00 2001 From: Kirill Mokevnin Date: Sun, 16 Aug 2026 18:45:40 -0400 Subject: [PATCH 1/2] =?UTF-8?q?build(lint):=20=D0=BF=D0=B5=D1=80=D0=B5?= =?UTF-8?q?=D0=B2=D0=B5=D1=81=D1=82=D0=B8=20=D1=84=D1=80=D0=BE=D0=BD=D1=82?= =?UTF-8?q?=D0=B5=D0=BD=D0=B4=20=D1=81=20biome=20=D0=BD=D0=B0=20oxlint=20?= =?UTF-8?q?=D0=B8=20oxfmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Последний репозиторий организации, где biome ещё был живым: конфиг, зависимость и вызов из Makefile. Канон кита это oxlint и oxfmt, регламент перехода лежит в docs/components-modernization.md. Конфиги скопированы каноническими из корня кита: сослаться на него нельзя, каждый компонент это отдельный репозиторий. Флаги инструментам не передаются, они сами находят свой конфиг. oxlint по каноническому конфигу находок не дал. Co-Authored-By: Claude Opus 5 (1M context) --- frontend/.oxfmtrc.json | 17 +++++++++++++++++ frontend/.oxlintrc.json | 38 ++++++++++++++++++++++++++++++++++++++ frontend/Makefile | 5 ++++- frontend/biome.json | 30 ------------------------------ frontend/package.json | 8 +++++--- 5 files changed, 64 insertions(+), 34 deletions(-) create mode 100644 frontend/.oxfmtrc.json create mode 100644 frontend/.oxlintrc.json delete mode 100644 frontend/biome.json diff --git a/frontend/.oxfmtrc.json b/frontend/.oxfmtrc.json new file mode 100644 index 0000000..12145ae --- /dev/null +++ b/frontend/.oxfmtrc.json @@ -0,0 +1,17 @@ +{ + "ignorePatterns": [ + "**/*.yml", + "**/*.yaml", + "**/*.json", + "**/*.jsonc", + "**/*.css", + "**/*.md", + "**/npm-cache/**", + "**/vendor/**", + "**/dist/**", + "**/build/**", + "**/coverage/**", + "**/.venv/**", + "**/__snapshots__/**" + ] +} diff --git a/frontend/.oxlintrc.json b/frontend/.oxlintrc.json new file mode 100644 index 0000000..ca00511 --- /dev/null +++ b/frontend/.oxlintrc.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json", + "plugins": [ + "typescript", + "unicorn", + "oxc", + "import", + "promise", + "node", + "jsdoc", + "vitest", + "react", + "react-perf", + "jsx-a11y", + "vue" + ], + "categories": { + "correctness": "error" + }, + "rules": { + "vitest/require-to-throw-message": "off" + }, + "env": { + "builtin": true, + "browser": true, + "node": true + }, + "ignorePatterns": [ + "**/node_modules/**", + "**/npm-cache/**", + "**/vendor/**", + "**/dist/**", + "**/build/**", + "**/coverage/**", + "**/.venv/**", + "**/__snapshots__/**" + ] +} diff --git a/frontend/Makefile b/frontend/Makefile index 85bf385..2f0f663 100644 --- a/frontend/Makefile +++ b/frontend/Makefile @@ -8,7 +8,10 @@ build: npm run build lint: - npx biome check . + npm run lint + +lint-fix: + npm run lint:fix test: echo no tests diff --git a/frontend/biome.json b/frontend/biome.json deleted file mode 100644 index 0c22c71..0000000 --- a/frontend/biome.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "$schema": "https://biomejs.dev/schemas/1.9.0/schema.json", - "vcs": { - "enabled": true, - "clientKind": "git", - "useIgnoreFile": true - }, - "files": { - "ignoreUnknown": false, - "ignore": [] - }, - "formatter": { - "enabled": true, - "indentStyle": "space" - }, - "organizeImports": { - "enabled": true - }, - "linter": { - "enabled": true, - "rules": { - "recommended": true - } - }, - "javascript": { - "formatter": { - "quoteStyle": "double" - } - } -} diff --git a/frontend/package.json b/frontend/package.json index 1c2e1f4..759bf9c 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,8 +8,9 @@ "scripts": { "dev": "vite --host", "build": "tsc && npx vite build", - "lint": "biome check .", - "preview": "vite preview" + "lint": "oxlint", + "preview": "vite preview", + "lint:fix": "oxfmt && oxlint --fix" }, "dependencies": { "axios": "^1.11.0", @@ -20,11 +21,12 @@ "url": "^0.11.4" }, "devDependencies": { - "@biomejs/biome": "^1.9.0", "@types/react": "^19.1.12", "@types/react-dom": "^19.1.9", "@vitejs/plugin-react": "^5.0.2", "npm-check-updates": "^18.1.0", + "oxfmt": "^0.63.0", + "oxlint": "^1.78.0", "typescript": "^5.9.2", "vite": "^7.1.5" } From 24a5e573888b60c18003aecef818b7ec45100a35 Mon Sep 17 00:00:00 2001 From: Kirill Mokevnin Date: Sun, 16 Aug 2026 18:45:41 -0400 Subject: [PATCH 2/2] =?UTF-8?q?style(frontend):=20=D0=BF=D1=80=D0=BE=D0=B3?= =?UTF-8?q?=D0=BD=D0=B0=D1=82=D1=8C=20oxfmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Формат отдельным коммитом, чтобы смысловая правка в нём не тонула: дефолты oxfmt и biome расходятся, и переход задевает пять файлов. Co-Authored-By: Claude Opus 5 (1M context) --- frontend/src/App.tsx | 16 ++-------------- frontend/src/components/users.tsx | 7 +------ frontend/src/main.tsx | 2 +- frontend/src/runServer.js | 8 ++++---- frontend/vite.config.ts | 4 ++-- 5 files changed, 10 insertions(+), 27 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 89644ad..8528791 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,12 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import jsonServerProvider from "ra-data-json-server"; -import { - Admin, - ListGuesser, - Resource, - ShowGuesser, - fetchUtils, -} from "react-admin"; +import { Admin, ListGuesser, Resource, ShowGuesser, fetchUtils } from "react-admin"; import authProvider from "./authProvider"; import { Dashboard } from "./components/Dashboard"; @@ -30,13 +24,7 @@ const App = () => ( dataProvider={dataProvider} // requireAuth > - + ( diff --git a/frontend/src/main.tsx b/frontend/src/main.tsx index f46c379..3854929 100644 --- a/frontend/src/main.tsx +++ b/frontend/src/main.tsx @@ -5,5 +5,5 @@ import App from "./App"; ReactDOM.createRoot(document.getElementById("root")!).render( - + , ); diff --git a/frontend/src/runServer.js b/frontend/src/runServer.js index 32ba2bd..a5e1558 100644 --- a/frontend/src/runServer.js +++ b/frontend/src/runServer.js @@ -1,8 +1,8 @@ -import { createServer } from 'vite'; +import { createServer } from "vite"; import react from "@vitejs/plugin-react"; -import path from 'node:path'; +import path from "node:path"; -import { fileURLToPath } from 'url'; +import { fileURLToPath } from "url"; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); @@ -11,7 +11,7 @@ const app = async () => { const vite = await createServer({ plugins: [react()], configFile: false, - root: path.resolve(__dirname, '../dist'), + root: path.resolve(__dirname, "../dist"), }); await vite.listen(); }; diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index 6b8f932..42c2a46 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -7,8 +7,8 @@ export default defineConfig({ server: { host: true, proxy: { - '/api': { - target: 'http://localhost:8080', + "/api": { + target: "http://localhost:8080", }, }, },