chore(tooling): восстановить точный паритет с eslint/prettier

- 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)
This commit is contained in:
Fringg
2026-07-12 01:35:44 +03:00
parent 0abc2f30ae
commit fd85ba1ae1
4 changed files with 20 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Run ESLint - name: Run linter
run: npm run lint run: npm run lint
- name: Check formatting - name: Check formatting

View File

@@ -6,10 +6,14 @@ language js
// canonical implementations) are exempted by the filename conditions below. // canonical implementations) are exempted by the filename conditions below.
file(name=$name, body=$body) where { 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 { $name <: not includes or {
"clipboard.ts", "utils/clipboard.ts",
"clipboard.js" "utils/clipboard.js"
}, },
$body <: contains bubble or { $body <: contains bubble or {
`window.confirm` as $use where { `window.confirm` as $use where {

View File

@@ -1,7 +1,15 @@
{ {
"$schema": "https://biomejs.dev/schemas/2.5.3/schema.json", "$schema": "https://biomejs.dev/schemas/2.5.3/schema.json",
"files": { "files": {
"includes": ["**", "!dist", "!node_modules", "!public", "!package-lock.json"] "includes": [
"**",
"!dist",
"!node_modules",
"!public",
"!package-lock.json",
"!**/*.min.js",
"!**/*.min.css"
]
}, },
"formatter": { "formatter": {
"enabled": true, "enabled": true,

View File

@@ -92,6 +92,9 @@
"lint-staged": { "lint-staged": {
"*.{ts,tsx,json}": [ "*.{ts,tsx,json}": [
"biome check --write --no-errors-on-unmatched" "biome check --write --no-errors-on-unmatched"
],
"*.css": [
"biome format --write --no-errors-on-unmatched"
] ]
} }
} }