mirror of
https://github.com/block/buzz.git
synced 2026-10-27 12:40:30 +00:00
## Summary - raise Desktop Rust's differential file-size ceiling from 1,000 to 1,500 lines - raise Desktop frontend and Mobile ceilings from 1,000 to 1,200 lines - keep Web at 1,000 lines and preserve the existing no-growth ratchet above each ceiling ## Why The flat 1,000-line limit is forcing mechanical trimming in Desktop and Mobile even for small cohesive changes. Surface-specific ceilings relieve that pressure without granting Web or every authored component a blanket 2,000-line budget. ## Testing - `just file-size-check` - `cd desktop && pnpm exec biome check scripts/check-file-sizes.mjs` - `node --check mobile/scripts/check-file-sizes.mjs` - `git diff HEAD^ --check` Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Carl <32a2e2c9d428ee08902cab75d956da2c1d235a22d4766b0dd4138bf6e2e5db1d@buzz.block.builderlab.xyz>
54 lines
1.4 KiB
JavaScript
54 lines
1.4 KiB
JavaScript
const DESKTOP_FRONTEND_MAX_LINES = 1200;
|
|
const DESKTOP_RUST_MAX_LINES = 1500;
|
|
|
|
export const rules = [
|
|
{
|
|
root: "src-tauri/src",
|
|
extensions: new Set([".rs"]),
|
|
maxLines: DESKTOP_RUST_MAX_LINES,
|
|
},
|
|
// Workspace member crates. Without this the ratchet's only Rust root is
|
|
// `src-tauri/src`, and a crate under `src-tauri/crates/` is born outside the
|
|
// repo's one size discipline -- silently, since the check still exits 0.
|
|
{
|
|
root: "src-tauri/crates",
|
|
extensions: new Set([".rs"]),
|
|
maxLines: DESKTOP_RUST_MAX_LINES,
|
|
},
|
|
{
|
|
root: "src/app",
|
|
extensions: new Set([".ts", ".tsx"]),
|
|
maxLines: DESKTOP_FRONTEND_MAX_LINES,
|
|
},
|
|
{
|
|
root: "src/features",
|
|
extensions: new Set([".ts", ".tsx"]),
|
|
maxLines: DESKTOP_FRONTEND_MAX_LINES,
|
|
},
|
|
{
|
|
root: "src/shared/api",
|
|
extensions: new Set([".ts", ".tsx"]),
|
|
maxLines: DESKTOP_FRONTEND_MAX_LINES,
|
|
},
|
|
{
|
|
root: "src/shared/context",
|
|
extensions: new Set([".ts", ".tsx"]),
|
|
maxLines: DESKTOP_FRONTEND_MAX_LINES,
|
|
},
|
|
{
|
|
root: "src/shared/lib",
|
|
extensions: new Set([".ts", ".tsx"]),
|
|
maxLines: DESKTOP_FRONTEND_MAX_LINES,
|
|
},
|
|
{
|
|
root: "src/shared/ui",
|
|
extensions: new Set([".ts", ".tsx"]),
|
|
maxLines: DESKTOP_FRONTEND_MAX_LINES,
|
|
},
|
|
{
|
|
root: "src/shared/styles",
|
|
extensions: new Set([".css"]),
|
|
maxLines: DESKTOP_FRONTEND_MAX_LINES,
|
|
},
|
|
];
|