mirror of
https://github.com/Xevion/banner.git
synced 2026-01-31 10:23:39 -06:00
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:
Vendored
-4
@@ -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
@@ -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
@@ -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 ."
|
||||||
|
|||||||
Reference in New Issue
Block a user