The purpose of this file is to cover Rungeon's coding standards. While you can automatically format your code with Prettier it is suggested you refer to this file for specific styles.
Ordinary string literals are delimited with single quotes (").
Each time a new block is opened, the indent increases by two spaces.
Every statement must be concluded with a semicolon (;).
Declare all variables with either const
or let
. The var
keyword must not be used.
Include a trailing comma whenever there is a line break between the final element and the closing bracket.
Example:
const values = ['first value', 'second value'];
Prefer arrow functions over the function
keyword.
- Give as descriptive a name as possible
- Avoid ambigious and unfamiliar abbreviations
- Don't abbreviate by deleting letters within a word
- Use only ASCII characters and digits
- Avoid Hungarian notation
All variables should be typed in lowerCamelCase
.
File names must be all lowercase and include no punctuation.
Mark deprecated methods with an annotation (@deprecated).
It is not required to change all existing code to meet current style guidelines.
{
"semi": true, // Print semicolons at the ends of statements
"singleQuote": false, // Use single quotes instead of double quotes
"trailingComma": "es5", // Print trailing commas where possible
"tabWidth": 2, // Number of spaces per indentation-level
"useTabs": false, // Don't indent lines with tabs
"bracketSameLine": true, // Put opening and closing brackets on the same line
"arrowParens": "avoid" // Avoid parentheses around arrow function arguments
}