computer.setup
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| computer.setup [2025/10/20 11:07] – [Tools and Environments] ig_mb | computer.setup [2025/11/04 10:39] (current) – [Tools and Environments] ig_mb | ||
|---|---|---|---|
| Line 33: | Line 33: | ||
| Prettier is an opinionated code formatter. You can install it for vscode from the marketplace from https:// | Prettier is an opinionated code formatter. You can install it for vscode from the marketplace from https:// | ||
| - | Not all projects are setup to use prettier. Make sure to configure your vscode to only use prettier if there' | + | Not all projects are setup to use prettier. Make sure to configure your vscode to only enable |
| {{: | {{: | ||
| + | You can setup a project to use prettier by creating a .prettierrc file with the following content: | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | { | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | } | ||
| + | } | ||
| + | ] | ||
| + | } | ||
| + | |||
| + | You can format many files with prettier by executing the following command: | ||
| + | |||
| + | npx prettier --write " | ||
| + | | ||
| + | |||
| + | F.e. in order to format all json and typescript files in all folders underneath the current directory you would use | ||
| + | |||
| + | npx prettier --write " | ||
| + | |||
| + | You can exclude files from being formatted by creating a .prettierignore file. This file uses the same syntax as .gitignore. | ||
| + | |||
| + | In order to prevent prettier from formatting info.json files for geometries, you could create a .prettierignore with the following content: | ||
| + | |||
| + | '' | ||
| ==== Source and files repositories aka GIT ==== | ==== Source and files repositories aka GIT ==== | ||
computer.setup.1760951252.txt.gz · Last modified: 2025/10/20 11:07 by ig_mb
