Skip to content

jsonc: Setting to allow trailing commas in jsonc #237258

Description

Re: #102061

Formatting jsonc with prettier adds trailing commas which vs code then flags as being invalid: prettier/prettier#15553

The proposed solution there is to define a jsonschema and use a vscode-specific extension to json-schema property to allow it. I'm already using an externally defined jsonschema that I can't edit, so this isn't a solution for me.

I'd like to request this be a standard vs code setting (in addition to the existing jsonschema setting). All my tooling supports trailing commas so I do not need to customize the behavior for specific files. I'd be happy for this to be off by default.

FWIW, even if I could disable trailing commas I wouldn't want to. They make editing easier and more robust to reordering fields, adding and deleting the final field, etc.

Metadata

Metadata

Labels

*out-of-scopePosted issue is not in scope of VS Codefeature-requestRequest for new features or functionalityjsonJSON support issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions