Skip to content

Latest commit

 

History

History
30 lines (23 loc) · 2 KB

File metadata and controls

30 lines (23 loc) · 2 KB

Contributing

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.

Project philosophy

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.

Project structure

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 running npm run build
  • test/ - Tests, run using npm run test

How to contribute

  1. Familiarize yourself briefly with the project philosophy and structure (see above).
  2. Implement your feature/bug fix on a new branch.
  3. Write some comprehensive tests in test/. Run npm run test and ensure that there is 100% code coverage and 100% branch coverage.
  4. Update the README with your changes.
  5. Create a pull request on Github. It will be merged once it is approved.