Skip to content

chore(ui): remove eslint-metrics.json lint-count snapshot - #32930

Merged
yuneng-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_/remove-eslint-metrics-63b302
Jul 11, 2026
Merged

chore(ui): remove eslint-metrics.json lint-count snapshot#32930
yuneng-berri merged 2 commits into
litellm_internal_stagingfrom
litellm_/remove-eslint-metrics-63b302

Conversation

@yuneng-berri

Copy link
Copy Markdown
Contributor

Relevant issues

Linear ticket

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • My PR passes all CI/CD checks (e.g., lint, format, unit tests)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • I have received a Greptile Confidence Score of at least 4/5 before requesting a maintainer review (Greptile reviews automatically once the PR is opened; only comment @greptileai to re-request a review after pushing changes)

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

This is a CI/tooling-only change with no runtime or proxy surface, so there is nothing to curl. Verification was that the lint gate still works after the removal: running the exact CI budget command locally (node scripts/check-lint-budgets.mjs <report> eslint-budgets.json) exits 0 and reports headroom on every rule, the lint-budget-lib unit tests pass, and make pre-commit passes with no schema.d.ts drift

Type

🧹 Refactoring

Changes

ui/litellm-dashboard/eslint-metrics.json was a committed snapshot of the current lint-violation counts kept purely for internal tracking. That tracking now lives elsewhere, so carrying the snapshot inside litellm only adds internal metrics we do not want to overload the repo with

This removes the file along with the machinery that kept it in sync: the CI drift check in the UI Lint workflow, the pre-commit regenerate-and-flag step, and the standalone npm run lint:metrics script

The ratchet gate itself is unchanged. eslint-budgets.json still enforces the per-rule ceilings in CI, so lint quality does not regress; only the redundant internal-metrics bookkeeping goes away

The eslint-metrics.json snapshot duplicated the violation counts already
enforced by eslint-budgets.json. Keeping it current added a CI drift check,
a pre-commit regenerate-and-flag step, and a standalone npm run lint:metrics
script, none of which caught anything the budget gate did not, yet all of
which failed noisily whenever the snapshot went stale. This drops the file
and that machinery while leaving eslint-budgets.json as the actual ratchet
gate
@yuneng-berri
yuneng-berri requested a review from a team July 11, 2026 18:56
@greptile-apps

greptile-apps Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the committed eslint-metrics.json snapshot and the surrounding tooling that kept it in sync (the --check/--write flags in check-lint-budgets.mjs, the findDrift helper, the update-lint-metrics.mjs script, the drift-detection block in pre_commit_lint.sh, and the lint:metrics npm script). The ratchet enforcement via eslint-budgets.json is untouched, so lint quality gates remain in effect.

  • Deletes eslint-metrics.json and update-lint-metrics.mjs; removes findDrift from lint-budget-lib.mjs and its corresponding tests, which directly mirrors the deleted functionality.
  • Simplifies check-lint-budgets.mjs argument parsing from a flag-based approach to plain positional args, matching the narrowed call sites in CI and pre-commit.

Confidence Score: 5/5

Safe to merge; all changes are confined to internal tooling with no runtime or proxy surface.

Every changed file is build/CI tooling. The budget enforcement path (eslint-budgets.json + countBudgetViolations) is untouched. Removed tests correspond exactly to the deleted findDrift function, so no regression coverage is lost. The simplification of argument parsing in check-lint-budgets.mjs is consistent with its updated call sites.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/test-litellm-ui-lint.yml Removes the --check eslint-metrics.json flag from the CI lint command; the budget enforcement step is unchanged.
scripts/pre_commit_lint.sh Removes drift-detection logic (--write flag, git diff check, and stale-file error message) for eslint-metrics.json; budget enforcement via check-lint-budgets.mjs remains intact.
ui/litellm-dashboard/scripts/check-lint-budgets.mjs Simplifies argument parsing from a flag-based (--check/--write) approach to plain positional args; removes the write/check blocks that maintained eslint-metrics.json.
ui/litellm-dashboard/scripts/lint-budget-lib.mjs Removes the findDrift export; countBudgetViolations is unchanged.
ui/litellm-dashboard/tests/lint-budget-lib.test.ts Removes findDrift test suite, which directly corresponds to the deleted function; countBudgetViolations tests are untouched.
ui/litellm-dashboard/scripts/update-lint-metrics.mjs Deleted; was the standalone script behind npm run lint:metrics, no longer needed.
ui/litellm-dashboard/eslint-metrics.json Deleted snapshot of per-rule violation counts; tracking has moved elsewhere so the committed file is no longer needed.
ui/litellm-dashboard/package.json Removes the lint:metrics convenience script; all other scripts are unchanged.

Reviews (1): Last reviewed commit: "Merge remote-tracking branch 'origin/lit..." | Re-trigger Greptile

@yuneng-berri
yuneng-berri enabled auto-merge July 11, 2026 19:02
@codecov

codecov Bot commented Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@codspeed-hq

codspeed-hq Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm_/remove-eslint-metrics-63b302 (34a8d41) with litellm_internal_staging (2631ce7)1

Open in CodSpeed

Footnotes

  1. No successful run was found on litellm_internal_staging (45d3644) during the generation of this report, so 2631ce7 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@yuneng-berri
yuneng-berri merged commit b21c4ce into litellm_internal_staging Jul 11, 2026
125 of 126 checks passed
@yuneng-berri
yuneng-berri deleted the litellm_/remove-eslint-metrics-63b302 branch July 11, 2026 20:29
yucheng-berri added a commit that referenced this pull request Jul 11, 2026
Accepts upstream's deletion of eslint-metrics.json (#32930 removed the
metrics gate), which also removes this branch's recurring conflict source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants