Type object
File match .yamlfmt yamlfmt.yml yamlfmt.yaml .yamlfmt.yaml .yamlfmt.yml
Schema URL https://catalog.lintel.tools/schemas/schemastore/yamlfmt/latest.json
Source https://www.schemastore.org/yamlfmt.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Configuration file for yamlfmt

Properties

line_ending string
Values: "lf" "crlf"
doublestar boolean

Use doublestar for include and exclude paths.

Default: false
continue_on_error boolean

Continue formatting and do not exit with code 1 when an invalid YAML file is found.

Default: false
match_type string
Values: "standard" "doublestar" "gitignore"
include string[]
exclude string[]
gitignore_excludes boolean

Use gitignore files for exclude paths in addition to exclude patterns.

Default: false
gitignore_path string

Path to the gitignore file used when gitignore exclusions are enabled.

Default: ".gitignore"
regex_exclude string[]
extensions string[]

Formatter settings. The basic formatter is the default formatter; kyaml is an alternate formatter type.

output_format string
Values: "default" "line" "gitlab"

Definitions

stringArray string[]
lineEnding string
matchType string
outputFormat string
basicFormatter object

Formatter settings for the basic formatter. The basic formatter is the default formatter.

type string

Formatter type.

Default: "basic"
Values: "basic"
indent integer

Indentation level in spaces for formatted YAML.

Default: 2
include_document_start boolean

Include --- at document start.

Default: false
line_ending string
Values: "lf" "crlf"
retain_line_breaks boolean

Retain line breaks in formatted YAML.

Default: false
retain_line_breaks_single boolean

Retain line breaks but collapse runs of blank lines to a single blank line.

Default: false
disallow_anchors boolean

Reject YAML anchors and aliases found in the document.

Default: false
max_line_length integer

Maximum line length. A value of 0 means no limit.

Default: 0
scan_folded_as_literal boolean

Preserve newlines in folded block scalars that start with >.

Default: false
indentless_arrays boolean

Render block sequence items without an increased indent.

Default: false
drop_merge_tag boolean

Drop the !!merge tag from well-formed merge keys that use <<.

Default: false
pad_line_comments integer

Number of padding spaces inserted before line comments.

Default: 1
trim_trailing_whitespace boolean

Trim trailing whitespace from lines.

Default: false
eof_newline boolean

Always add a newline at end of file.

Default: false
strip_directives boolean

Attempt to strip YAML directives before formatting and put them back afterwards.

Default: false
array_indent integer

Indentation level for block sequences. A value of 0 keeps the formatter default behavior.

Default: 0
indent_root_array boolean

Indent an array that appears at the root indentation level of the document.

Default: false
disable_alias_key_correction boolean

Disable correction for alias nodes used as mapping keys.

Default: false
force_array_style string

Force arrays to be written in flow or block style. Leave empty to preserve the original style.

Default: ""
Values: "" "flow" "block"
force_quote_style string

Force quoted scalars to use single or double quotes. Leave empty to preserve the original style.

Default: ""
Values: "" "single" "double"
kyamlFormatter object

Formatter settings for the kyaml formatter.

type const: "kyaml" required

Formatter type.

Constant: "kyaml"
formatter basicFormatter | kyamlFormatter

Formatter settings. The basic formatter is the default formatter; kyaml is an alternate formatter type.