Maintaining a consistent coding style is crucial for the readability and maintainability of the 4Ddeveloper App codebase. Please adhere to the following coding standards when contributing to the project.
-
Indentation:
- Use spaces for indentation (preferably 2 or 4 spaces).
-
Variable Naming:
- Use meaningful and descriptive names for variables and functions.
-
Comments:
- Add comments to explain complex code sections or to provide additional context.
-
Testing:
- Write tests for new features or changes whenever possible.
-
Commit Messages:
- Write clear and concise commit messages following the Conventional Commits specification.
// Good Example
function calculateTotalPrice(itemPrice, quantity) {
// Calculate total price
const totalPrice = itemPrice * quantity;
return totalPrice;
}
// Bad Example
function calc(itemPrice, qty) {
const total = itemPrice * qty; // calculate