Welcome to the Fugitive Labs style guide. This guide borrows heavily from Khan Academy and AirBnb's style guides, so thanks to them!
Our intention here is to keep things readable and consistent. Please do your part on the team to help keep the spirit of this consistency in both your own code, as well as politely pointing out violations in other people's code when doing their code reviews. While code prettiness should never be valued over launching or any user-visible impacting changes to the code, the idea is that keeping a readable codebase helps things be more maintainable and in the long run will make it easier to do the real changes that do make user-visible changes.
There may be lots of legacy files and projects that do not adhere to the current style guide. If you're editing an old file, be consistent with what's around you.
To help adhere to these rules, some tools are available to automatically catch, and in some cases fix, style violations. See the per-language guides below for more info.
While you are free to use your text editor of choice, we ask that you adhere to the following settings.
- Use soft-tabs with a two space indent. Spaces are the only way to guarantee code renders the same in any person’s environment.