Closed
Description
Problem
While building the UI using the make ui
command, the following sequence of commands is run:
@cd ui && pnpm pre-install && pnpm build && cd -
During development, we ran into an issue where linting was not done consistently. Specifically, I ran npm run lint
, but other developers didn't, which made it harder to find and fix the issue, especially with Issue #1217.
Suggested Solution
To improve consistency and avoid future confusion, we should add the npm run lint
step to the make ui
process. This will ensure linting is always run as part of the build process.
Proposed Update:
ui:
@cd ui && pnpm pre-install && pnpm build && npm run lint && cd -
This ensures that linting is always performed after building the UI, maintaining consistent code quality across all developers.
Alternatives Considered
- CI/CD Pipeline Linting: Ensure linting is mandatory in the CI/CD pipeline to catch any linting issues before deployment.
- Pre-commit Hooks: Use pre-commit hooks (e.g., Husky) to enforce linting before every commit, ensuring developers don’t forget to lint locally.
Impact
Adding this change will:
- Ensure consistent linting across all developers.
- Prevent hard-to-find bugs related to inconsistent code quality.
- Make the development process smoother and more predictable.