Code Best Practices
Active CI/CD pipelines
As of 03/09/2025:
Pull requests
Auto format checking pipeline on changed files in
src/main/frontend
Auto-fixes formatting errors and automatically comments on any warnings or errors. Fails if there is any linting errors.
Commits
JUnit unit test pipeline with test reports for backend. Only runs if backend changes.
Linting
Frontend
We use ESLint for all files (.ts
, .html
) in the src/main/frontend
defined in src/main/frontend/eslint.config.js
.
We use the recommended Angular template rules (templateRecommended
), recommended accessibility rules (templateAccessibility
) for Angular templates, and use Prettier with the recommended template to enforce consistent styling.
We highly recommend setting up ESLint in your IDE to detect errors and auto apply formatting fixes when you save the file.
VSCode: Install the ESLInt plugin: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
Add
"editor.formatOnSave": true
tosettings.json
to fix formatting when you save the file.
JetBrains (WebStorm, IntelliJ, etc): https://www.jetbrains.com/help/webstorm/eslint.html
Enable fixing on save: https://www.jetbrains.com/help/webstorm/eslint.html#ws_eslint_configure_run_eslint_on_save
To run the linter manually, run npx eslint . --fix
in the src/main/frontend
directory.
Last updated