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 of fixture runner options #12619

Merged

Conversation

JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Jan 12, 2021

Q                       A
License MIT

Add basic JSON schema of Babel fixture runners. Configure json.schemas so that it works on VSCode.

image

image

Note that currently /data/schema.json will be published to npm. I am either good with publishing or not.

@JLHwung JLHwung added the PR: Internal 🏠 A type of pull request used for our changelog categories label Jan 12, 2021
@babel-bot
Copy link
Collaborator

babel-bot commented Jan 12, 2021

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52423/

@@ -0,0 +1,195 @@
{
Copy link
Contributor Author

@JLHwung JLHwung Jan 12, 2021

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.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 12, 2021

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:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

@@ -0,0 +1,18 @@
{
"editor.formatOnSave": true,
Copy link
Contributor Author

@JLHwung JLHwung Jan 12, 2021

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. 😄

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo May 27, 2022

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.

Copy link
Contributor

@liuxingbaoyu liuxingbaoyu May 27, 2022

Choose a reason for hiding this comment

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

microsoft/vscode#40233

Yes, it looks like VS Code supports this a bit badly.

@liuxingbaoyu
Copy link
Contributor

liuxingbaoyu commented May 27, 2022

Amazing work! Looking forward to it being merged.

@nicolo-ribaudo nicolo-ribaudo force-pushed the add-json-schema-of-fixture-options branch from e254a38 to 6575be0 Compare Jul 4, 2022
@nicolo-ribaudo nicolo-ribaudo force-pushed the add-json-schema-of-fixture-options branch from 6575be0 to 698c12d Compare Jul 4, 2022
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

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!

@nicolo-ribaudo nicolo-ribaudo merged commit 6fd6ce1 into babel:main Jul 4, 2022
21 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the add-json-schema-of-fixture-options branch Jul 4, 2022
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 4, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Internal 🏠 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants