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 of fixture runner options #12619
Add json schema of fixture runner options #12619
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52423/ |
@@ -0,0 +1,195 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This schema was generated from typings/babel-parser.d.ts
by https://github.com/YousefED/typescript-json-schema. I have tuned a little bit: replacing minItems: 2, maxItems: 2
to additionalItems: false
.
We should explore generating API option types from JSON schema or vice.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e254a38:
|
.vscode/settings.json
Outdated
@@ -0,0 +1,18 @@ | |||
{ | |||
"editor.formatOnSave": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is from my local config. I can remove it if you have different choices here. 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I have my own vscode config and the main reason I "ignored" this PR is that I was annoyed that it contained its own config, sorry 😅
We can rename it to settings.example.json
, and have this in our .gitignore
:
.vscode
!.vscode/settings.example.json
and then in CONTRIBUTING.md
mention that we have that example vscode config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it looks like VS Code supports this a bit badly.
Amazing work! Looking forward to it being merged. |
e254a38
to
6575be0
Compare
6575be0
to
698c12d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the PR to do #12619 (comment), and added a few lines to CONTRIBUTING.md
to explain how to setup the editor.
We can iterate in a follow-up PR if we want to automatically generate the parser schema file!
Add basic JSON schema of Babel fixture runners. Configure
json.schemas
so that it works on VSCode.Note that currently
/data/schema.json
will be published to npm. I am either good with publishing or not.