Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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.

None yet

2 participants