This document outlines best practices for developers contributing to UniPath.io, a project designed with Next.js, Material-UI, and AWS Amplify.
- Follow the Airbnb JavaScript Style Guide.
- Use ESLint and Prettier to enforce code style and quality.
- Ensure code is clean, well-commented, and easy to maintain.
- Follow the Conventional Commits specification.
- Include meaningful commit messages that explain the changes and why they were made.
- Submit Pull Requests for code reviews, and ensure at least one other developer reviews your code before merging.
- Address all feedback and ensure all automated checks pass before merging.
- Write unit and integration tests using Jest and React Testing Library.
- Strive for a high level of code coverage, and ensure no regressions are introduced.
- Document code inline using JSDoc-style comments.
- Update README and other documentation files as necessary to reflect changes in the codebase or setup instructions.
- Keep dependencies up-to-date, and follow semantic versioning.
- Review and understand the licenses of all dependencies to ensure they are compatible with this project's license.
- Handle errors gracefully, providing helpful error messages and logging errors as necessary.
- Use custom error classes to differentiate between different types of errors.
- Follow the WCAG guidelines to ensure the application is accessible.
- Use semantic HTML and ARIA roles to improve accessibility.
- Optimize images and other assets to reduce load times.
- Use Next.js's built-in image optimization and lazy loading features.
These best practices are aimed at ensuring a high level of code quality and consistency across the UniPath.io codebase, making it easier for developers to contribute and collaborate.