This article contains a set of rules and guidelines that you should follow when working on an issue.
There's not much rules here, but it is good to follow some of the key points:
- Indentation and spacing
- Use tabs, not spaces.
- Use LF file separators (UNIX style).
- Separate logical blocks with empty lines
- Separate block statements (if/else, try/catch, switch, etc.) with empty lines
- Always place opening braces on a new line
- Always place conditional statement on a new line
- Always make sure that there's no ESLint warnings.
- Prioritize readability over performance.
- More comments = better.
ESLint
This project uses ESLint to maintain key aspects of the code style. It runs in following cases:
- Project build (fails build if critical issues are found)
- Manual
yarn lint command execution
- ESLint extension for VS Code is installed