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

Include support for JSON schema #16

Closed
sindresorhus opened this issue May 24, 2017 · 4 comments
Closed

Include support for JSON schema #16

sindresorhus opened this issue May 24, 2017 · 4 comments
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted

Comments

@sindresorhus
Copy link
Owner

sindresorhus commented May 24, 2017

Issuehunt badges

Can be useful to ensure you only set the correct types in your config, and could validate if the config file is manually edited by the user.

https://github.com/epoberezkin/ajv looks like the best one.

Thoughts? Would you use this?


Note: This should be implemented in conf first.

yaodingyd earned $100.00 by resolving this issue!

@skbolton
Copy link

skbolton commented Jul 9, 2017

I think this would be interesting to add and implement

@cliffordfajardo
Copy link

cliffordfajardo commented Nov 24, 2018

Just adding on to the discussion .. for folks who are using Typscript / Flow:

const myStore = JSON.parse(store) as some_interface_I_defined

I think it should be the user's responsibility to validate that a value that's going into the store is the correct format though.

@sindresorhus sindresorhus changed the title Include support for JSON schema? Include support for JSON schema Jan 16, 2019
@IssueHuntBot
Copy link

@issuehuntfest has funded $100.00 to this issue. See it on IssueHunt

sindresorhus added a commit to sindresorhus/conf that referenced this issue Apr 2, 2019
Fixes sindresorhus/electron-store#16

Co-authored-by: Sindre Sorhus <sindresorhus@gmail.com>
@IssueHuntBot
Copy link

@sindresorhus has rewarded $90.00 to @yaodingyd. See it on IssueHunt

  • 💰 Total deposit: $100.00
  • 🎉 Repository reward(0%): $0.00
  • 🔧 Service fee(10%): $10.00

@issuehunt-oss issuehunt-oss bot added the 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt label May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🎁 Rewarded on Issuehunt This issue has been rewarded on Issuehunt help wanted
Projects
None yet
Development

No branches or pull requests

4 participants