Skip to content

feat: JSONC schema#1939

Open
Zamiell wants to merge 1 commit intoDavidAnson:nextfrom
Zamiell:fix-jsonc
Open

feat: JSONC schema#1939
Zamiell wants to merge 1 commit intoDavidAnson:nextfrom
Zamiell:fix-jsonc

Conversation

@Zamiell
Copy link

@Zamiell Zamiell commented Feb 6, 2026

The current schemas do not allow trailing commas, which is a problem because in JSONC files, it is optimal to have trailing commas for all the same reasons that you would want trailing commas in your JavaScript/TypeScript files. Furthermore, tools like Prettier will automatically add trailing commas when auto-formatting JSONC files. Thus, I have added a new schema for people to use for JSONC files.

@DavidAnson
Copy link
Owner

I already do not like the duplication that the "additionalProperties" property creates, but doubling the number of schemas again (as this change would do) seems too far.

But perhaps we can defer that discussion because it does not seem to me (searching only from my phone) that the "allowTrailingCommas" property you propose to introduce is a valid JSON schema property. I do not see it described in the core or validation documents here: https://json-schema.org/specification

If I'm overlooking something, please link to the relevant specification. Otherwise, the enforcement of that behavior seems to be coming from some other tool you are using.

@DavidAnson
Copy link
Owner

It seems I've looked into this twice before:

#1397

DavidAnson/markdownlint-cli2#270

My position has not changed since then.

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.

2 participants