halstack-react icon indicating copy to clipboard operation
halstack-react copied to clipboard

Enhance Code Quality with Linting and Formatting Tools

Open Mil4n0r opened this issue 7 months ago • 1 comments

Describe the solution you'd like We want to follow the best practices and achieve a higher code quality by using the following automatic tools:

  • ESLint: A tool for identifying and reporting on patterns found in JS/TS code.
  • Prettier: An opinionated code formatter that enforces a consistent style by parsing code and reprinting it.
  • Husky: A tool that allows running scripts at various stages of the Git lifecycle, ensuring quality checks are performed before commits.
  • lint-staged: A tool that runs linters on staged files, ensuring only the relevant files are checked during commits.

Describe alternatives you've considered

  • Manual Code Reviews: Relying solely on manual code reviews for enforcing coding standards. However, this can be time-consuming and prone to human error.
  • Other Linting Tools: Considering alternatives such as JSHint or TSLint. ESLint was chosen due to its wide adoption and flexibility.
  • Pre-commit Scripts Without Husky: Implementing custom pre-commit scripts without using Husky. While possible, Husky simplifies the setup and maintenance of Git hooks.

Additional context For more information, there is a DSDR called "Code and commit quality improvement" in Halstack Wiki

Mil4n0r avatar Jul 23 '24 06:07 Mil4n0r