Skip to content

Latest commit

 

History

History
47 lines (27 loc) · 1.46 KB

CONTRIBUTING.md

File metadata and controls

47 lines (27 loc) · 1.46 KB

Contributing

Setting up

$ npm install

EditorConfig

There's an .editorconfig file to be used with EditorConfig. Please install a plugin for your editor, to help keep consistent encoding, line endings etc.

Static analysis

JSCS

This codebase uses JSCS with the Crockford preset.

You can verify the style using

$ npm run lint

Js Beautifier

You can use Js Beautifier with the provided .jsbeautifyrc to format code to match the rules set out in the JSCS preset.

There are plenty of editor plugins for both of these tools. Here's what I use with Sublime Text 3: JsFormat for re-formatting code and SublimeLinter with the SublimeLinter-jscs plugin for linting.

Unit Tests

Run tests in PhantomJS

$ npm run buster

If you're testing browser specific issues, like stubbing out localStorage in Firefox, it'd be a good idea to also run the tests in that browser.

See BusterJS documentation for more details.

Pull Requests

Your pull requests will be built by TravisCI, and will fail if either static analysis or unit tests fail.

Once Travis goes green for your pull request, they will be reviewed.