Skip to content

Fixed a bug when comments are allowed but trailing commas aren't#35

Merged
aeschli merged 1 commit intomicrosoft:masterfrom
minecraft-addon-tools:fix-trailing-comma-severity-bug
Jan 10, 2019
Merged

Fixed a bug when comments are allowed but trailing commas aren't#35
aeschli merged 1 commit intomicrosoft:masterfrom
minecraft-addon-tools:fix-trailing-comma-severity-bug

Conversation

@abc-55
Copy link
Contributor

@abc-55 abc-55 commented Nov 8, 2018

This was probably a typo. This change doesn't affect VSCode because in VSCode, either both comments and trailing commas are allowed, or both are not allowed.

@abc-55
Copy link
Contributor Author

abc-55 commented Nov 9, 2018

I have just discovered that this would change the behavior of Monaco:

This means that trailingCommaSeverity is DiagnosticSeverity.Error and commentSeverity is undefined
https://github.com/Microsoft/vscode-json-languageservice/blob/7b0bc0dcf45ab6411429e986716f969f92773850/src/services/jsonValidation.ts#L52-L53

However, because of the bug, trailing commas were ignored too.

The question is: What is the right behavior? Should allowComments also affect trailing commas?

@aeschli aeschli merged commit c4f4431 into microsoft:master Jan 10, 2019
@aeschli aeschli added this to the December/January 2019 milestone Jan 10, 2019
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