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

merged 1 commit into from Jan 10, 2019


None yet
2 participants
Copy link

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.


This comment has been minimized.

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

let trailingCommaSeverity = documentSettings ? toDiagnosticSeverity(documentSettings.trailingCommas) : DiagnosticSeverity.Error;
let commentSeverity = documentSettings ? toDiagnosticSeverity(documentSettings.comments) : this.commentSeverity;

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

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
license/cla All CLA requirements met.

@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