This file contains instructions on how to contribute to this project.
Anyone can contribute to this project-
though it is up to the owner (Tyler Hurson) whether or not the contribution is ultimately included in a release.
The easiest way to contribute is to implement something in BACKLOG.md and create a pull request for it.
Original features are welcome but are not guaranteed to be accepted.
The philosophy of validate-declarative is defined in terms of the software qualities it emphasizes.
From most important to least important:
-
Simplicity - The implementation and the API should be as simple, obvious, and intuitive as possible. Internal functions and variables should have descriptive names. In the case where it is not immediately obvious what a piece of code is doing, it should be commented.
-
Accuracy/Robustness - The project should be well-tested, and there should be a high degree of confidence that the module will be able to handle any sort of data and produce the expected outcome as described in the README. Anything less than 100% code coverage and 100% branch coverage is unacceptable.
-
Performance - Validation should be as fast as possible, without sacrificing robustness. Each validation, the schema should only be traversed once.
The project is broken into several directories. The relevant ones are:
src/- Source code (main file:index.js)dist/- Distributed code that is included in the release, generated by runningnpm run buildtest/- Tests, run usingnpm run test
- Familiarize yourself briefly with the project philosophy and structure (see above).
- Implement your feature/bug fix on a new branch.
- Write some comprehensive tests in
test/. Runnpm run testand ensure that there is 100% code coverage and 100% branch coverage. - Update the README with your changes.
- Create a pull request on Github. It will be merged once it is approved.