- Most important: Look around. Match the style you see used in the rest of the project. This includes formatting, naming things in code, naming things in documentation.
- Add trailing commas,
- 2 spaces for indentation (no tabs)
- "Attractive"
- Use semicolons;
- ES6 standards
- Prefer
'
over"
- Do not use the optional parameters of
setTimeout
andsetInterval
- 80 character line length
- Prefer
"
over'
for string literal props - When wrapping opening tags over multiple lines, place one prop per line
{}
of props should hug their values (no spaces)- Place the closing
>
of opening tags on the same line as the last prop - Place the closing
/>
of self-closing tags on their own line and left-align them with the opening<