Skip to content

Conversation

@ematipico
Copy link
Member

Summary

Closes #6537

Now the formatter follows the formatter.json.trailingCommas option, even though it might emit an invalid JSON file.

Test Plan

Tests updated

@changeset-bot
Copy link

changeset-bot bot commented Jul 3, 2025

🦋 Changeset detected

Latest commit: 9187444

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ematipico ematipico requested review from a team July 3, 2025 08:31
@github-actions github-actions bot added A-Formatter Area: formatter L-JSON Language: JSON and super languages labels Jul 3, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Jul 3, 2025

CodSpeed Performance Report

Merging #6683 will not alter performance

Comparing fix/trailing-comma-json (9187444) with main (af78d6d)

Summary

✅ 114 untouched benchmarks

@github-actions github-actions bot added the A-CLI Area: CLI label Jul 3, 2025
@ematipico ematipico merged commit 43d871e into main Jul 3, 2025
29 checks passed
@ematipico ematipico deleted the fix/trailing-comma-json branch July 3, 2025 16:46
@github-actions github-actions bot mentioned this pull request Jul 3, 2025
@flying-sheep
Copy link

thank you!

Now the formatter follows the formatter.json.trailingCommas option, even though it might emit an invalid JSON file.

I mean, if the user sets allowTrailingCommas: true for a file, the user says “in this file, trailing commas are valid”, so it’s purely a user error to do that for files that can’t have trailing commas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Formatter Area: formatter L-JSON Language: JSON and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📝 biome 2 removes trailing commas from JSONC files with .json file extension

4 participants