Page:
Formatter
Pages
API SMHI
API TimeEdit
Accessibility Testing
Api documentation
Bat/Ps
Branch Creation
C# Coding Convention
CSS Coding Convention
Coding Conventions
Creating new databases
Dapper
Documentation for service endpoints
Documentation of useTemperature and mock sensor
Energy endpoints
Environment
Evaluation react-grid-layout
Evaluation Localization
Evaluation Password hashing
Evaluation Testing framework
Evaluation of Logging Frameworks
Formatter
Frontend model
Generic Diagram for Sensor data flow
Home
How to- Creating Databases in Docker
Implementing different Styles
Implementing new Mockup sensors
Implementing new Views
Installation script documentation
Installation
Issues
JSON Coding Convention
Jest Testing
Layout endpoints
Linux
Localization
Login endpoints
Mac
Middleware model
Mock API Ceation Guidelines
Mockup models
Model Tools and Standards
Parking endpoints
React/JavaScript Coding Convention
React
Reviews
Room booking endpoints
SQL Coding Convention
Scheduled Database tasks
Scripting Coding Convention
Secrets and .env
Server Access
Server-Deployment
Service/API models
System models
System requirements
Temperature endpoints
Testing API with Bruno
Testing Architecture
Testing frontend for Mobile devices
Testing frontend with Playwright
Testing methodology
Västtrafik API
Webpage Design
Windows
pg_cron and scheduled database jobs
xUnit Testing
No results
13
Formatter
Tim Svensson edited this page 2026-04-24 13:03:35 +00:00
Table of Contents
Formatter (Prettier) installation and usage
This guide shows how to install and setup the Prettier Formatter when using VS Code. This formatter will work for all currently relevant files, except C# which uses the standard dotnet formatter already on your system (if you have followed the setup guide).
- Search for esbenp.prettier-vscode in the VS Code extension manager and download it.
- Change the VS Code default formatter to Prettier by going to File → Preferences → Settings → Default Formatter then choosing Prettier - Code formatter.
- Also change the Format On Save setting to true.
- To confirm that it is working, use the format file shortcut in a file (Shift+Alt+F standard in Windows, right click and look for format document to see command).
- The file .prettierrc, which exists in the root of frontend folder, includes the configurations.
- When using the above command in a C# for the first time you will be directed to choose a different formatter, choose ms-dotnettools.csharp.
This config example will make prettier the formatter for all languages and auto-format on saving:
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
This config will make prettier the formatter for JavaScript and JSON, and automatically format on saving. All other languages retain their system-default formatter:
{
"editor.formatOnSave": false,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
}
1. Setup
2. Standards
- Coding Conventions
- Issues
- Branch creation
- Reviews
- Implementation Standards
- [WIP] Creating new databases
- Localization
3. Models and Diagrams
4. Testing
5. Documentation
- Documentation for service endpoints
- API documentation
- Webpage Design
- Secrets and .env
- Evaluations
- Installation and Rebuild script documentation
6. Guides and How-to's
7. Micro Service Mockup Api
- Guidelines Mircro Service Mockup
- Documentation of useTemperature/useTemperatureTimeSeries mockup sensor