format
Every file: the Prettier layout for the file types it formats, and line endings, final newlines, and trailing whitespace from editorconfig-checker. The format settings set the indentation, line length, quotes, and line endings for every formatter.
Selected when
Section titled “Selected when”Always.
Checks
Section titled “Checks”prettier
Section titled “prettier”Checks each file Prettier handles for unformatted code.
Runs at the commit stage. gspot check --fix fixes what it can.
Formatting by hand differs by editor; one formatter keeps diffs about the change and not the spacing.
What to do
Section titled “What to do”Run the fix: command that the report prints to format the file.
Example
Section titled “Example”A JavaScript file with const value={enabled:true}; differs from the Prettier output. Run gspot check --fix to format it.
Turn it off
Section titled “Turn it off”gspot ignore format/prettier --paths "<path>" --reason "<why>"editorconfig-checker
Section titled “editorconfig-checker”Checks line endings, final newlines, and trailing whitespace in every file against .editorconfig.
Runs at the commit stage.
These rules cover the files no formatter touches, so a stray tab or missing newline never lands in a diff. The formatters handle indentation.
What to do
Section titled “What to do”Fix the line the checker names; most editors apply .editorconfig on save.
Example
Section titled “Example”A file with CRLF line endings under an .editorconfig that requires LF reports a finding. Save it with LF endings.
Turn it off
Section titled “Turn it off”gspot ignore format/editorconfig-checker --paths "<path>" --reason "<why>"Settings
Section titled “Settings”| Setting | What it sets |
|---|---|
format.indent_style |
The character of one indent level. |
format.indent_width |
Spaces per indent level. |
format.print_width |
The line width formatters wrap at. |
format.quotes |
The quote for the languages where a formatter chooses. When unset, Python gets double quotes and the other languages single. |
format.trailing_commas |
Where trailing commas go. |
format.semicolons |
Whether JavaScript and TypeScript statements end with semicolons. |
format.bracket_spacing |
Whether Prettier prints spaces inside the braces of an object. |
format.arrow_parens |
Whether Prettier keeps the parentheses around a single arrow function parameter. |
format.prose_wrap |
How Prettier wraps Markdown prose. |
format.override |
Formatting options for repository-relative paths, in order. |
Tools and versions
Section titled “Tools and versions”| Tool | Version |
|---|---|
| prettier | 3.9.10 |
| editorconfig-checker | 4.0.2 |
Files gspot writes
Section titled “Files gspot writes”prettier.config.mjs, .editorconfig, .gspot/configurations/format/prettier.json, and .prettierignore