-
-
Notifications
You must be signed in to change notification settings - Fork 7
Code style
Eugene Fox edited this page Sep 20, 2024
·
6 revisions
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 is better.
Tip
This repository has additional configuration files that contain some formatting rules and recommended extensions for VS Code editor. So, it is recommended to use VS Code editor during the development, since in this case it will be easier to follow these guidelines.
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
npm run lintcommand execution - ESLint extension for VS Code is installed
©2025 Eugene Fox. Licensed under MIT license