GUI Style Checking
Style Teleop Code
Section titled “Style Teleop Code”Keeping our code well-formatted makes it easier for everyone to read and maintain.
Always format your code before pushing commits, or at least try to remember.
Backend ROS Code (Python/C++)
Section titled “Backend ROS Code (Python/C++)”From the root of the mrover repo, run:
./style.sh --fix- Running
./style.shby itself will show files that need formatting. - Running with
--fixwill automatically apply formatting.
Frontend Code (Vue/TypeScript/CSS)
Section titled “Frontend Code (Vue/TypeScript/CSS)”Navigate to the frontend directory (from root mrover):
cd teleoperation/basestation_gui/frontendThen run:
bun run lint- This runs ESLint, which checks for code style violations and common bugs in your TypeScript and Vue code.
- If you see any lint errors, fix them before pushing your code.
For CSS style checking:
bun run stylelint- This runs Stylelint, which checks CSS ordering and conventions in
.vueand.cssfiles.
Additionally, the Prettier plugin should take care of the more mundane tasks like spacing and indentation in your code when you save (Ctrl-S).