To maintain a consistent and high-quality codebase, please adhere to the following guidelines:
- All the files will be a
TypeScript
file (.ts | .tsx
). - Use kebab-case for files (e.g.,
my-file.ts
).
The repository is loaded with ESLint and Prettier with their own specific configurations. It is mandatory to follow these configurations.
yarn pretty
yarn lint
- Use meaningful and descriptive variable names.
- Follow camelCase for variable names (e.g.,
myVariable
).
- Fully typecast your code using TypeScript.
- Clearly define the types for variables, function parameters, and explicit return values.
- Include comments for code that might be unclear to others.
- Use comments sparingly and focus on explaining why, not what (code should be self-explanatory).
- Follow the Better Comments convention for improved comment readability.
- Use different comment styles to convey the significance of comments.
- // add example comments
- Follow the Conventional Commits convention for writing commit messages. This convention helps in generating a meaningful changelog and automating versioning.
- Prefix your commit messages with the relevant type (e.g., "feat(decoder): add new feature", "fix(decoder): resolve bug").
- Be concise and provide enough information for others to understand the changes.
- Ensure your changes pass the Prettier and ESLint checks before submitting a pull request.
- Clearly state the purpose and context of your changes in the pull request description.
- Follow the Pull Request template diligently.
- Include unit tests for new features and bug fixes.
- Ensure all tests pass before submitting changes.
By following these style guide principles, we can collectively maintain a clean and easily maintainable codebase. Thank you for your commitment to code quality!