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

Add json schema data to the .vscode/settings.json file. #2905

Merged
merged 1 commit into from
Oct 4, 2018

Conversation

connorshea
Copy link
Contributor

@connorshea connorshea commented Oct 2, 2018

With this change to .vscode/settings.json, VS Code will automatically point out errors with the current JSON file based on the schema. It'll also make the editor auto-suggest properties, display property descriptions (which the schemas don't currently have, but they could be added if we want them) and other nice things.

Value isn't accepted, lists accepted values:

screen shot 2018-10-02 at 4 37 40 pm

An example of how descriptions would work if we added them to the schema:

screen shot 2018-10-02 at 4 27 20 pm

A list of missing, required properties:

screen shot 2018-10-02 at 4 31 18 pm

The list of properties that could be added (I used the command palette's "Trigger Suggest" function to show this, not sure how you'd get this to show otherwise):

screen shot 2018-10-02 at 4 39 21 pm

What happens when you have a URL that doesn't match the regex for mdn_url:

screen shot 2018-10-02 at 4 47 15 pm

See also the relevant VS Code Documentation for this feature.

@connorshea
Copy link
Contributor Author

cc: @ExE-Boss I figure you might be interested in trying this out :)

@Elchi3 Elchi3 added the infra Infrastructure issues (npm, GitHub Actions, releases) of this project label Oct 4, 2018
Copy link
Member

@Elchi3 Elchi3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tried this and it is working nicely, thank you for this @connorshea 👍

display property descriptions (which the schemas don't currently have, but they could be added if we want them)

I think this is #309, right?

@Elchi3 Elchi3 merged commit 187a505 into mdn:master Oct 4, 2018
@connorshea
Copy link
Contributor Author

Yep, that’d be it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Infrastructure issues (npm, GitHub Actions, releases) of this project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants