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>
22 lines
567 B
JavaScript
22 lines
567 B
JavaScript
import { realpathSync } from "node:fs";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { runFileSizeCheck } from "../../scripts/check-file-sizes-core.mjs";
|
|
import { rules } from "./file-size-policy.mjs";
|
|
|
|
const scriptPath = realpathSync(fileURLToPath(import.meta.url));
|
|
const projectRoot = path.resolve(path.dirname(scriptPath), "..");
|
|
|
|
export const policy = {
|
|
projectRoot,
|
|
rules,
|
|
label: "Mobile",
|
|
};
|
|
|
|
if (
|
|
process.argv[1] &&
|
|
realpathSync(path.resolve(process.argv[1])) === scriptPath
|
|
) {
|
|
await runFileSizeCheck(policy);
|
|
}
|