Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/kevinrodriguezmorales/siget/llms.txt

Use this file to discover all available pages before exploring further.

Siget uses Prettier ^3.8.1 for consistent, automated code formatting across all TypeScript source files and Angular HTML templates. A single .prettierrc file at the project root contains the complete configuration, keeping formatting rules explicit and easy to adjust.

Configuration File

{
  "printWidth": 100,
  "singleQuote": true,
  "overrides": [
    {
      "files": "*.html",
      "options": {
        "parser": "angular"
      }
    }
  ]
}

Options Reference

OptionValueDescription
printWidth100Maximum line length before Prettier wraps to the next line
singleQuotetrueUse single quotes (') instead of double quotes (") in TypeScript and JavaScript files
parser (html override)angularUse the Angular-aware HTML parser for all *.html files
The angular parser understands Angular-specific template syntax — including structural directives like *ngFor and *ngIf, two-way bindings like [(ngModel)], event bindings like (click), and property bindings like [disabled]. Using the default html parser would mis-format or break these expressions.

Running Prettier

You can invoke Prettier directly via npx or through any script you add to package.json.
# Format all files in the project
npx prettier --write .

# Check formatting without writing any changes (useful in CI)
npx prettier --check .

# Format a specific file
npx prettier --write src/app/app.ts
Add a format script to package.json so formatting is a first-class project command:
"scripts": {
  "format": "prettier --write .",
  "format:check": "prettier --check ."
}
Then run npm run format to format the entire project, or npm run format:check in your CI pipeline to enforce consistent style.

Editor Integration

The recommended way to use Prettier in day-to-day development is via the Prettier - Code formatter extension for Visual Studio Code (esbenp.prettier-vscode). Enable format-on-save in your workspace settings to apply formatting automatically every time you save a file:
// .vscode/settings.json
{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true
}
This ensures every file committed to version control is already formatted, eliminating formatting noise in pull request diffs.

EditorConfig

Siget also includes an .editorconfig file at the project root. EditorConfig handles low-level editor settings — such as indentation style, indentation size, end-of-line character, and trailing newlines — before Prettier runs. The two tools complement each other: EditorConfig normalises what the editor inserts as you type, while Prettier reformats the full file on save.
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single
ij_typescript_use_double_quotes = false

[*.md]
max_line_length = off
trim_trailing_whitespace = false
SectionSettingValuePurpose
[*]indent_stylespaceAll files use spaces, not tabs
[*]indent_size2Two-space indentation across the project
[*]insert_final_newlinetrueFiles always end with a newline
[*]trim_trailing_whitespacetrueTrailing spaces are stripped on save
[*.ts]quote_typesingleTypeScript files prefer single quotes
[*.md]max_line_lengthoffNo line-length limit in Markdown files
[*.md]trim_trailing_whitespacefalseTrailing spaces in Markdown files are preserved (used for line breaks)

Build docs developers (and LLMs) love