Skip to content

Instantly share code, notes, and snippets.

@jasoet
Created January 7, 2014 04:43
Show Gist options
  • Save jasoet/8294730 to your computer and use it in GitHub Desktop.
Save jasoet/8294730 to your computer and use it in GitHub Desktop.
Hacking Rules
= General rules =
* Always ask if you have any questions or doubts on anything
* Try to consult first when you need to make big changes
* Always document your changes in the code
* Always provide a unit test when you make changes covering: good cases, error cases, cases with bad inputs
= Repositories =
Rules:
* Always do your changes in your own personal repository
* Always create a branch before doing any changes, and start working inside the branch
* Always create a pull request from that branch when you need to merge your changes
= Commits =
Rules:
* A single commit does not break build or functionalities.
* Put your changes in a collection of small commits
* One commit represents one significant change, don't try to put several different changes into one commit
* Pick a good sentence to represent the change. Use "Changes: Fix text to be right aligned" instead of "Fixing text". This is useful when we need to go back and try to find a certain changes in the past.
* Push to your own branch before calling it a day.
= Styles =
As a general rule of thumb, apply the styles according to this guidelines for new files. Follow the styles in existing files even they're not following the guidelines. If you want to fix them, do it in separate commits.
Always check your JavaScript files with jsLint.
== Indentation ==
Use 2 space indentation.
== Quotes ==
Use double quotes instead of single quotes.
== semicolons ==
Always end your lines with semicolons.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment