fix: separate Biome format and lint checks to enable auto-format

Biome's 'check' command runs both formatting and linting, causing
overlapping failures that prevented auto-format from triggering.
Split into separate commands and removed web-lint check since Biome
linting crashes on Svelte 5 syntax. Renamed check steps for clarity.
This commit is contained in:
2026-01-31 01:03:58 -06:00
parent 5dd35ed215
commit ac8dbb2eef
3 changed files with 12 additions and 17 deletions
-4
View File
@@ -62,10 +62,6 @@ jobs:
bun run format:check || echo "::warning::Frontend formatting issues found (not failing on push)" bun run format:check || echo "::warning::Frontend formatting issues found (not failing on push)"
fi fi
- name: Lint
working-directory: web
run: bun run lint
- name: Type check - name: Type check
working-directory: web working-directory: web
run: bun run typecheck run: bun run typecheck
+11 -12
View File
@@ -99,16 +99,15 @@ interface Check {
const checks: Check[] = [ const checks: Check[] = [
{ {
name: "rustfmt", name: "rust-format",
cmd: ["cargo", "fmt", "--all", "--", "--check"], cmd: ["cargo", "fmt", "--all", "--", "--check"],
hint: "Run 'cargo fmt --all' to see and fix formatting issues.", hint: "Run 'cargo fmt --all' to see and fix formatting issues.",
}, },
{ name: "clippy", cmd: ["cargo", "clippy", "--all-features", "--", "--deny", "warnings"] }, { name: "rust-lint", cmd: ["cargo", "clippy", "--all-features", "--", "--deny", "warnings"] },
{ name: "cargo-check", cmd: ["cargo", "check", "--all-features"] }, { name: "rust-check", cmd: ["cargo", "check", "--all-features"] },
{ name: "rust-test", cmd: ["cargo", "nextest", "run", "-E", "not test(export_bindings)"] }, { name: "rust-test", cmd: ["cargo", "nextest", "run", "-E", "not test(export_bindings)"] },
{ name: "svelte-check", cmd: ["bun", "run", "--cwd", "web", "check"] }, { name: "svelte-check", cmd: ["bun", "run", "--cwd", "web", "check"] },
{ name: "biome", cmd: ["bun", "run", "--cwd", "web", "format:check"] }, { name: "web-format", cmd: ["bun", "run", "--cwd", "web", "format:check"] },
{ name: "biome-lint", cmd: ["bun", "run", "--cwd", "web", "lint"] },
{ name: "web-test", cmd: ["bun", "run", "--cwd", "web", "test"] }, { name: "web-test", cmd: ["bun", "run", "--cwd", "web", "test"] },
{ name: "actionlint", cmd: ["actionlint"] }, { name: "actionlint", cmd: ["actionlint"] },
]; ];
@@ -125,19 +124,19 @@ const domains: Record<
recheck: Check[]; recheck: Check[];
} }
> = { > = {
rustfmt: { "rust-format": {
peers: ["clippy", "cargo-check", "rust-test"], peers: ["rust-lint", "rust-check", "rust-test"],
format: () => runPiped(["cargo", "fmt", "--all"]), format: () => runPiped(["cargo", "fmt", "--all"]),
recheck: [ recheck: [
{ name: "rustfmt", cmd: ["cargo", "fmt", "--all", "--", "--check"] }, { name: "rust-format", cmd: ["cargo", "fmt", "--all", "--", "--check"] },
{ name: "cargo-check", cmd: ["cargo", "check", "--all-features"] }, { name: "rust-check", cmd: ["cargo", "check", "--all-features"] },
], ],
}, },
biome: { "web-format": {
peers: ["svelte-check", "biome-lint", "web-test"], peers: ["svelte-check", "web-test"],
format: () => runPiped(["bun", "run", "--cwd", "web", "format"]), format: () => runPiped(["bun", "run", "--cwd", "web", "format"]),
recheck: [ recheck: [
{ name: "biome", cmd: ["bun", "run", "--cwd", "web", "format:check"] }, { name: "web-format", cmd: ["bun", "run", "--cwd", "web", "format:check"] },
{ name: "svelte-check", cmd: ["bun", "run", "--cwd", "web", "check"] }, { name: "svelte-check", cmd: ["bun", "run", "--cwd", "web", "check"] },
], ],
}, },
+1 -1
View File
@@ -8,7 +8,7 @@
"preview": "vite preview", "preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"typecheck": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "typecheck": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"lint": "biome check .", "lint": "biome lint .",
"test": "vitest run", "test": "vitest run",
"format": "biome format --write .", "format": "biome format --write .",
"format:check": "biome format ." "format:check": "biome format ."