harbor
harbor copied to clipboard
Add Prettier format script for consistent code formatting in UI files
Thank you for contributing to Harbor!
Comprehensive Summary of your change
This PR uses Prettier to the frontend component of the Harbor project to enforce consistent code formatting across frontend files. Currently, the frontend codebase has inconsistent formatting, which makes contributions more error-prone and increases unnecessary diffs in PRs.
By adding npm format script, we can ensure uniform formatting, which will improve the overall readability and maintainability of the code. It also reduces potential formatting-related issues in future PRs, ensuring that the focus stays on functionality rather than style.
- Added an npm script to easily format all files in the project (
npm run prettier
). - Applied Prettier formatting to the existing frontend codebase to showcase its effectiveness.
Issue being fixed
N/A (This is an enhancement to improve code quality and consistency).
Please indicate you've done the following:
- [x] Well Written Title and Summary of the PR
- [x] Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
- [x] Accepted the DCO. Commits without the DCO will delay acceptance.
- [x] Made sure tests are passing and test coverage is added if needed.
- [x] Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.