First, contributions are welcome! I expect smaller requests to be handled without issue. If you have a larger feature request that you want to contribute yourself, you might consider opening an issue first, as I make no guarantees about merging things, especially if they change the nature of the project, or make it do a lot more than it already does. I'm a proponent of small, concise, single-purpose modules that do one thing and do it well.
Please try to adhere, as close as possible, to the style and structure already present in this repository. Please don't be offended if I ask you clean something up, as consistency is important. Please see the .eslint.json config for a comprehensive style guide. Some of the more salient points follow:
} else {Prefer
exports.foo = function() {
to
module.exports = {
foo: function() {
unless you're exporting a single a function, like
```
module.exports = function() {
}
```
Use spaces at the beginning and end of inline objects and arrays: { foo: 'bar' } and [ 'foo', 'bar' ]
But . . . if you have longer objects, please use line breaks like this:
var obj = {
foo: 'bar',
list: [
{
name: baz'
},
{
name: 'quux'
}
]
}
I could also be okay with the slightly more compact array-of-object format:
var obj = {
foo: 'bar',
list: [{
name: baz'
}, {
name: 'quux'
}]
}
Use semi-colons to end lines. The one exception is, for some reason, I got into the habit of not putting a semi-colon at the end of a describe(), context(), or it() block in a test. I don't know why.
Please write tests for any added feature or bug fix. Tests are run with grunt. Pull requests are configured with test coverage thresholds via codeclimate.
I actually don't care much about commit message formatting or keeping a clean history via squashes. Obviously, if you want to do those things, that's fine, but I won't make you. In general, I think a commit message should be atomic (which is to say, if you need to use the word "and," then it should be two commits), should summarize the changes in the commit, and should use present tense, as in "Fix bug" (not "Fixed" or "Fixes").
Unless there is some reason not to, I will probably use the "Squash and merge" version of pull request acceptance, so some of this will happen for you.