Here are the conventions that we should adhere to as a team in order to create consistency between our work. General guidelines below followed by more specific settings for editors that have been used by the team.
- Don't save out files with trailing whitespace
- Put a newline at the end of the file
- Use Unix style (LF) line endings
- Indent with spaces
- 4 space indents
- Indent with spaces
- 2 space indents
- Indent with spaces
- 2 space indents
Under Preferences > Settings – User:
{
"default_line_ending": "unix",
"ensure_newline_at_eof_on_save": true
}
With a JavaScript file open go under Preferences > Settings – More > Syntax Specific – User:
{
"tab_size": 4,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true
}
With a Sass file open go under Preferences > Settings – More > Syntax Specific – User:
{
"tab_size": 2,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true
}
With a Handlebars file open go under Preferences > Settings – More > Syntax Specific – User:
{
"tab_size": 2,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true
}