noahgorstein / jqp

A TUI playground to experiment with jq
MIT License
2.19k stars 40 forks source link

feat: implement json schema for config #78

Closed EmilyGraceSeville7cf closed 4 months ago

EmilyGraceSeville7cf commented 5 months ago

image

Validates a config file.

If this PR is accepted this schema is referenced in SchemaStore to automatically enable validation for .jqp.yaml.

noahgorstein commented 5 months ago

I'm not actually too familiar with how this would be used. So editors like VSCode/Sublime/etc use this file to validate a config? If that's the case, how do they consume this config file? Does it read directly from this repo?

EmilyGraceSeville7cf commented 5 months ago

I'm not actually too familiar with how this would be used. ... If that's the case, how do they consume this config file? Does it read directly from this repo?

There are several possible ways of utilizing this schema (YAML extension is required in VS Code to make them work):

So editors like VSCode/Sublime/etc use this file to validate a config?

Exactly. 😄

noahgorstein commented 4 months ago

Thanks for your contribution @EmilyGraceSeville7cf !