Repository navigation
fix(lint): Format pruned suppression budgets with oxfmt - #131989
Merged
Merged
Conversation
The prune wrote oxlint-suppressions.json with JSON.stringify, which expands every budget onto three lines. Since oxfmt collapses objects that fit on one line, the format hook rewrote those files on every prune, and the CI bot committed the expansion back each time. Run the written assets through oxfmt so prune output already matches the format hook.
nsdeschenes
approved these changes
Nov 20, 2026
sentry-junior Bot
added a commit
that referenced
this pull request
Nov 20, 2026
Drops the reformatted budgets from the earlier pre-commit fix commit, which only changed layout. #131989 makes the prune write master's format.
ArthurKnaus
added a commit
that referenced
this pull request
Nov 20, 2026
Master now formats pruned budgets with oxfmt (#131989), so the suppression files match master again and this PR no longer touches them.
sentry-junior Bot
added a commit
that referenced
this pull request
Nov 20, 2026
Revert the bot's expanded JSON from the prune step, which fought the format hook until #131989 landed. The files now match master. Co-Authored-By: Nicholas Deschenes <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On every frontend pull request, the
pre-commit lintworkflow runspnpm run lint:suppressions --pruneand the bot commits the result as "apply pre-commit fixes". Since #131758 set oxfmt'sobjectWraptocollapse, that commit expands every{"count": N}in the threeoxlint-suppressions.jsonfiles onto three lines, with identical JSON content. The next run'sformathook collapses them again and fails, and restoring the files only triggers the bot again (seen on #131502).The prune serialized budgets with
JSON.stringify(_, null, 2). We now pipe each written asset through the oxfmt CLI with--stdin-filepath, so it picks up the same.oxfmtrc.jsonand ignore patterns as theformathook. Pruning master now leaves the files byte-identical. Excluding the files from oxfmt would also stop the loop, but the next prune would re-expand them and they would become the only unformatted JSON in the repo.Budget comparisons and the temporary root asset still use the plain
JSON.stringifyoutput, because only committed files need the hook's format.