Code Style - TorinitTechnologies/Torinit-Coding-Guidelines GitHub Wiki
There are many way to write valid code that renders fine in the browser, or returns the value it is supposed to. HTML and CSS parsing is generally quite forgiving, and JavaScript has many flexible ways of achieving the same result.
If everyone codes according to their preferences, however, it may become hard to interpret how other developers have accomplished their goal, or what exactly a piece of code is doing. So, it is necessary for everyone in the team to follow the same set of rules to make it easier for everyone to write clean, semantic code.
HTML and CSS
To keep all of the HTML (including DOMs rendered by frameworks) and CSS (including use with pre-processors) well structured, and standardized, all developers should read and follow this style guide by Mark Otto.
Regarding comments (in CSS), please see additional information in section 3 in this guide.
Any deviations from these guides will be listed below.
JavaScript
Since we are using AirBnB setting in our linting configuration for JavaScript, it makes sense to follow their style guide for JavaScript as well.
Any deviations from this guide will be listed below.