kentcdodds / kentcdodds/webpack-validator-DEPRECATED
Solve validation with Joi
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 93
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
So the more of those validate functions i'm writing the more i'm asking myself if this approach is optimal. We are in fact doing 95% schema validation, a task which a library like joi (or maybe the one you wrote, Kent, api-check ?) solves perfectly, but we are writing this very imperatively and with ad hoc, non-normalized error messages.
In fact i am thinking of experimentally starting an alternative approach in another repo, maybe just called webpack-joi-schema and see how far this would replicate the use case of our approach here. The main goal would be finding out where the limits of using a schema validation library would be and maybe check out if the burden of all those manual tests could be "extracted" onto the shoulders of a mature, more generic library -- thereby substantially reducing the error surface.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the current validate functions and their manual tests, then compare the existing approach with Joi and api-check as proposed. The issue suggests experimenting in a separate webpack-joi-schema repository; done would require determining how much of the current use case it can replicate and where schema validation falls short.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100