Coding Guidelines

To maintain code quality and consistency across the Frontend.mu project, please adhere to the following guidelines: However,These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

1. General Principles

  • Clarity and Simplicity: Write clear and straightforward code. Avoid complex or obscure constructs.
  • Consistency: Follow the existing code patterns and project structure. Consistency is key to maintainability.

2. Language and Frameworks

PLEASE ADD GUIDELINES

3. File and Folder Structure

PLEASE ADD GUIDELINES

4. Code Formatting

PLEASE ADD GUIDELINES

5. Commit Messages

  • Format: Follow the convention: type(scope): description. For example, fix(navbar): resolve alignment issue.
  • Types: Use types like feat, fix, docs, style, refactor, test, and chore.
  • Detail: Provide enough context in the description to explain why the change was made.

6. Documentation

PLEASE ADD GUIDELINES

7. Testing

PLEASE ADD GUIDELINES

8. Accessibility

  • ARIA: Use ARIA attributes where necessary to improve accessibility.
  • Keyboard Navigation: Ensure that all interactive elements are keyboard-accessible.
  • Contrast and Readability: Follow WCAG guidelines for contrast and readability.

9. Pull Requests

  • Review: Before submitting a pull request, review your code and ensure it meets these guidelines.
  • Testing: Run all tests and linters. Ensure everything passes.
  • Description: Provide a clear and concise description of what your PR does and why.

10. Code Reviews

  • Constructive Feedback: Provide constructive feedback that is clear and actionable.
  • Respect: Respect the original author's approach but suggest improvements when necessary.
  • Responsibility: Reviewers should feel responsible for the quality and maintainability of the codebase.

11. Dependencies

  • Updates: Keep dependencies up-to-date, especially for security patches.
  • Minimalism: Avoid adding unnecessary dependencies. Justify the need for each new dependency in your PR.

Thank you for contributing to Frontend.mu! Following these guidelines helps us maintain a high standard of quality and consistency.

2016 - 2024 ~ Front-End Coders Mauritius