Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub
- Fork and clone the repo
$ npm install
to install dependencies$ npm run validate
to validate you've got it working- Create a branch for your PR
Have a look at test/README.md
to see how testing works. Run npm run watch:test
while developing. Have fun! :)
- Use
!!
at the beginning of your custom error string to get rid of the key at the beginning of the error message. Example:
const ERROR_MSG = '!!A custom error message without a "key" in front of it'
// Look at node_modules/joi/lib/language.js to know
// which key to override in the options.language object
const schema = Joi
.string()
.options({ language: { string: { base: ERROR_MSG } } })
Please install editorconfig plugin for your preferred editor.
We follow a convention for commit messages. Please follow this convention for your commit messages.
You can use commitizen
to help you to follow the convention
Once you are ready to commit the changes, please use the below commands
git add <files to be comitted>
$ npm run commit
... and follow the instruction of the interactive prompt.