- Search for existing issues. Please check to see if someone else has reported the same issue.
- Share as much information as possible. Include operating system and version, browser and version. Also, include steps to reproduce the bug.
Refer to the README.
Please use an editor with support for ESLint and EditorConfig. Configuration files for both tools are provided in the root directory of the project.
See Mozilla Foundation JavaScript Style Guide
This project does not currently fully support the latest mofo-style version because it is not a front end ES6 project. At the moment it uses a modified version of .eslintrc.yaml, provided in the root directory, instead of using the file inside ./node-modules/mofo-style/.eslintrc.yaml.
TL;DR Run npm run lint
before pushing a commit. It will validate your JS.
lowerCamelCase
General variablesUpperCamelCase
Constructor functions- Use semantic and descriptive variables names (e.g.
colors
notclrs
orc
). Avoid abbreviations except in cases of industry wide usage (e.g.AJAX
andJSON
).
Any patch should be manually tested as much as possible.
You can run all automated tests with mocha test/*
or npm test
. If mocha is not installed globally, please use ./node_modules/mocha/bin/mocha test/*
.
Unit and Integration tests can also be run separately with npm run test:unit
and npm run test:integration
respectively.
- Try not to pollute your pull request with unintended changes – keep them simple and small. If possible, squash your commits.
- Try to share which browsers and devices your code has been tested in before submitting a pull request.
- If your PR resolves an issue, include closes #ISSUE_NUMBER in your commit message (or a synonym).
- Review
- If your PR is ready for review, another contributor will be assigned to review your PR within 1 business day
- The reviewer will comment on the PR with a final r+ or r-, along with inline comments on the code (if any)
- r-: address the comments left by the reviewer. Once you're ready to continue the review, ping the reviewer in a comment.
- r+: You code will be merged to dev