Tho we can use a Style Guide of a company like Google, i think its better to keep rules simpler in our case so i have simplified some of the guidelines for Code readability below:
Code can be read, even by a beginner- The code will be maintained not by us but by our juniors in the future so it is necessary that they are able to understand the code, below are some of the Style Guideline for the code.
Naming convention
Use meaningful and descriptive names for variables, functions and classes
Example: ‘calculateTotalScore()’ insted of calcTotal()
'studentCounter insted of 'sc'
Variable and Functions should be in camelCase - calculateTotalScore() Classes PascalCase - StudentProfile Constant - UPPER_SNAKE_CASE - MAX_VALUE = 100
Code Structure and formatting
Function Design
For example: If we want to check structure of user input, its validity and process it, all 3 of them should be done by separate functions instead of a single one
Include Code comments
Git Commit / Pull Request Messages
Use Clear, meaningful messages:
Title
fix; Resolved login bug when username has special characters
feat: Added Events section to the homepage
Chore
Breaking Change
docs
style
Refactor
Followed by a one line description of the commit
In depth Description in the body