From fd85ba1ae1170c0cf3c5151bd81c6567aa8fcb73 Mon Sep 17 00:00:00 2001 From: Fringg Date: Sun, 12 Jul 2026 01:35:44 +0300 Subject: [PATCH] =?UTF-8?q?chore(tooling):=20=D0=B2=D0=BE=D1=81=D1=81?= =?UTF-8?q?=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=B8=D1=82=D1=8C=20=D1=82=D0=BE?= =?UTF-8?q?=D1=87=D0=BD=D1=8B=D0=B9=20=D0=BF=D0=B0=D1=80=D0=B8=D1=82=D0=B5?= =?UTF-8?q?=D1=82=20=D1=81=20eslint/prettier?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - telegram-webview-guards.grit: исключение сузил с подстроки "platform" до якорного "src/platform/" — прежний eslint-override действовал ровно на src/platform/**, а bare-substring щадил бы любой файл с "platform" в имени (проверено: src/platform всё ещё exempt, гвард срабатывает в обычных файлах) - biome.json: вернул исключения *.min.js/*.min.css из .prettierignore - lint-staged: вернул форматирование *.css в pre-commit (biome format --write) — иначе CI-формат-чек ловил бы css, который хук не трогал - lint.yml: метка шага "Run ESLint" → "Run linter" (выполняет biome) --- .github/workflows/lint.yml | 2 +- biome-plugins/telegram-webview-guards.grit | 10 +++++++--- biome.json | 10 +++++++++- package.json | 3 +++ 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e942159..e6fe497 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -19,7 +19,7 @@ jobs: - name: Install dependencies run: npm ci - - name: Run ESLint + - name: Run linter run: npm run lint - name: Check formatting diff --git a/biome-plugins/telegram-webview-guards.grit b/biome-plugins/telegram-webview-guards.grit index 7d656d4..905513e 100644 --- a/biome-plugins/telegram-webview-guards.grit +++ b/biome-plugins/telegram-webview-guards.grit @@ -6,10 +6,14 @@ language js // canonical implementations) are exempted by the filename conditions below. file(name=$name, body=$body) where { - $name <: not includes "platform", + // Exempt the canonical implementations only, matching the old eslint override + // scope (`src/platform/**`, `src/utils/clipboard.ts`) — an anchored path + // fragment, not a bare "platform" substring that would also spare any + // unrelated file with "platform" in its name. + $name <: not includes "src/platform/", $name <: not includes or { - "clipboard.ts", - "clipboard.js" + "utils/clipboard.ts", + "utils/clipboard.js" }, $body <: contains bubble or { `window.confirm` as $use where { diff --git a/biome.json b/biome.json index 7485a43..380440a 100644 --- a/biome.json +++ b/biome.json @@ -1,7 +1,15 @@ { "$schema": "https://biomejs.dev/schemas/2.5.3/schema.json", "files": { - "includes": ["**", "!dist", "!node_modules", "!public", "!package-lock.json"] + "includes": [ + "**", + "!dist", + "!node_modules", + "!public", + "!package-lock.json", + "!**/*.min.js", + "!**/*.min.css" + ] }, "formatter": { "enabled": true, diff --git a/package.json b/package.json index 468712e..7d9fc8a 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,9 @@ "lint-staged": { "*.{ts,tsx,json}": [ "biome check --write --no-errors-on-unmatched" + ], + "*.css": [ + "biome format --write --no-errors-on-unmatched" ] } }