mirror of
https://github.com/PR0M3TH3AN/TORCH.git
synced 2026-10-27 07:51:52 +00:00
Refactor `scripts/check-file-size.mjs` and `scripts/check-innerhtml.mjs` to use `node:util.parseArgs` for parsing command-line arguments. This allows users to configure directory and file exclusions via `--exclude-dir`, `--exclude-file`, and `--no-defaults`, instead of relying on hardcoded lists. This change improves versatility while maintaining backward compatibility by keeping the original hardcoded lists as defaults. It also adds support for `--max-lines` in `check-file-size.mjs` and `--help` in both scripts. Verification: - Manually verified that both scripts respect the new flags and defaults. - Confirmed that `--report` mode still works as expected. - Confirmed that unknown flags (like `--update`) are safely ignored (due to `strict: false`). Co-authored-by: PR0M3TH3AN <[email protected]>