Skip to content
Mikey Saugstad edited this page Apr 25, 2020 · 13 revisions

General guidelines

  1. Keep lines <=120 characters long whenever it doesn't negatively impact readability.
  2. Comments should start with a space and a capital letter, and they should end with a period.
    // This is the correct style.
    //this is incorrect
    
  3. Use spaces instead of tabs.
  4. End all files with a newline character. You can tell if you did not by looking at your PR on Github.
  5. Commit messages on Github should be descriptive. Say what change you actually made to the code. Here are some common commit messages people make that are not descriptive enough:
    • Fixes #880
    • Addresses feedback from PR
    • Update ModalMissionComplete.js

JavaScript guidelines

  1. If you are adding new JavaScript files, try to use ECMA6 instead of ECMA5. However, most of our code was written using ECMA5, and if you are editing a file that is entirely written using ECMA5, keep with that standard in your edits.
  2. If you are declaring multiple variables, add a var on each line:
    var do;
    var this;
    
    var not,
        this;
    

Scala guidelines

  1. Use the Slick library for accessing the database instead of plain SQL whenever possible (because there is compiler type checking for it).
  2. For comments/documentation, try to adhere to the Scaladoc style guide.

PostgreSQl guildelines