Skip to content

fix(config): strip jsonc comments and trailing commas#671

Merged
psteinroe merged 3 commits intomainfrom
fix/jsonc-trailing
Feb 2, 2026
Merged

fix(config): strip jsonc comments and trailing commas#671
psteinroe merged 3 commits intomainfrom
fix/jsonc-trailing

Conversation

@psteinroe
Copy link
Copy Markdown
Collaborator

@psteinroe psteinroe commented Feb 2, 2026

using a crate from the oxc project for simplicity

other options where

  • extending our hacky existing solution (too hacky)
  • using the biome parser (would require parsing the ast etc)

and oxc is a good source for crates :)

fixes #669

@psteinroe psteinroe force-pushed the fix/jsonc-trailing branch 2 times, most recently from a670e0c to c8c6c79 Compare February 2, 2026 09:15
Replace custom strip_jsonc_comments function with json-strip-comments crate
which properly handles both comments and trailing commas.

Also reverts biome dependency versions to pre-pretty-printer state to fix
build failures caused by incompatible biome crate versions.

Fixes #669
@psteinroe psteinroe merged commit 25d67d6 into main Feb 2, 2026
9 checks passed
@psteinroe psteinroe deleted the fix/jsonc-trailing branch February 2, 2026 12:27
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.

JSONC configuration files reject trailing commas

1 participant