Closed nettofarah closed 8 years ago
Let me know if you think this makes sense.
I actually have built my own version of this as well (api-check) and I considered using joi. And there's nothing stopping us from using these for this project. However, I don't think that it's necessary to require it for every validator. I like the API that I've created for defining validators and I don't see a reason to change it to this (still open to talk about changes).
So I think we'll stick with the library agnostic approach for now. You might consider writing a wrapper that converts your validator's output to this tool's format.
Thanks for the idea and the interest!
Sure! No problem.
This is a super interesting idea, so yeah. I should send some PRs and ideas your way soon.
hey, @kentcdodds. This project sounds like an awesome idea.
I recently built a library that helps with property validation in javascript objects. (https://github.com/nettofarah/property-validator) Maybe we could use it validate the webpack config options?
Here's an idea of how it could look like:
or use assert
this would raise a ValidationError (my preferred option)
validation functions are all stateless and are super easy to extend.
All you need to do is to create a function with this signature: