# format

> Prettier and editorconfig-checker on every file. One `[format]` block sets the indentation, line length, quotes, and line endings for every formatter.

Prettier and editorconfig-checker on every file. One `[format]` block sets the indentation, line length, quotes, and line endings for every formatter.

## Checks

| Check                                                                           | Stage    | Level         | What it does                                                                                      |
| ------------------------------------------------------------------------------- | -------- | ------------- | ------------------------------------------------------------------------------------------------- |
| [`format/prettier`](/reference/checks/format/prettier/)                         | `commit` | `recommended` | Checks each file Prettier handles for unformatted code.                                           |
| [`format/editorconfig-checker`](/reference/checks/format/editorconfig-checker/) | `commit` | `recommended` | Checks line endings, final newlines, and trailing whitespace in every file against .editorconfig. |

## Settings

| Setting                                                                   | What it sets                                                      |
| ------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [`format.indent_style`](/reference/gspot-toml/#format.indent_style)       | The character of one indent level: space or tab.                  |
| [`format.indent_width`](/reference/gspot-toml/#format.indent_width)       | Spaces per indent level.                                          |
| [`format.print_width`](/reference/gspot-toml/#format.print_width)         | The line width formatters wrap at.                                |
| [`format.line_ending`](/reference/gspot-toml/#format.line_ending)         | The line ending every file uses: lf or crlf.                      |
| [`format.final_newline`](/reference/gspot-toml/#format.final_newline)     | Whether every file ends with a newline.                           |
| [`format.quotes`](/reference/gspot-toml/#format.quotes)                   | Single or double, for the languages where a formatter chooses.    |
| [`format.trailing_commas`](/reference/gspot-toml/#format.trailing_commas) | Where trailing commas go: all, es5, or none.                      |
| [`format.semicolons`](/reference/gspot-toml/#format.semicolons)           | Whether JavaScript and TypeScript statements end with semicolons. |
| [`format.override`](/reference/gspot-toml/#formatoverride)                | Formatting options for repository-relative paths, in order.       |

## Selected when

Always selected.

## Tools and versions

| Tool                 | Version |
| -------------------- | ------- |
| prettier             | `3.8.1` |
| editorconfig-checker | `3.4.0` |

## Files gspot writes

gspot writes `.editorconfig`, `.gspot/configurations/general/format/prettier.json`, and `.prettierignore`.
