Type object
File match tombi.toml **/tombi/config.toml
Schema URL https://catalog.lintel.tools/schemas/schemastore/tombi/latest.json
Source https://www.schemastore.org/tombi.json

Validate with Lintel

npx @lintel/lintel check
Type: object

Tombi (鳶 /toɴbi/) is a toolkit for TOML; providing a formatter/linter and language server. See the GitHub repository for more information.

Properties

toml-version TomlVersion | null

TOML version to use if not specified in the schema and comment directive.

Default: "v1.0.0"
files FilesOptions | null
format FormatOptions | null
lint LintOptions | null
lsp LspOptions | null
schema SchemaOverviewOptions | null
schemas array | null
overrides array | null

Definitions

TomlVersion string | string
FilesOptions object
include array | null

The file match pattern to include in formatting and linting. Supports glob pattern.

Default:
[
  "**/*.toml"
]
minItems=1
exclude array | null

The file match pattern to exclude from formatting and linting. Supports glob pattern.

minItems=1
FormatOptions object
rules FormatRules | null
FormatRules object
array-bracket-space-width ArrayBracketSpaceWidth | null
key = [ 1, 2, 3 ]
#      ^       ^  <- this
Default: 0
array-comma-space-width ArrayCommaSpaceWidth | null
key = [ 1, 2, 3 ]
#         ^  ^    <- this
Default: 1
date-time-delimiter DateTimeDelimiter | null

In accordance with RFC 3339, you can use T or space character between date and time.

  • T: Use T between date and time like 2001-01-01T00:00:00
  • space: Use space between date and time like 2001-01-01 00:00:00
  • preserve: Preserve the original delimiter.
Default: "T"
indent-style IndentStyle | null

Whether to use spaces or tabs for indentation.

  • space: Use spaces for indentation.
  • tab: Use tabs for indentation.
Default: "space"
indent-sub-tables boolean | null

If true, the sub-table will be indented.

[table]
    [table.sub-table]
    key = "value"
# ^^  <- this
Default: false
indent-table-key-value-pairs boolean | null

If true, the table key-value pairs will be indented.

[table]
    key = "value"
# ^^  <- this
Default: false
indent-width IndentWidth | null

⚠️ WARNING ⚠️
This option is only used when the indentation style is space.

Default: 2
inline-table-brace-space-width InlineTableBraceSpaceWidth | null
key = { a = 1, b = 2 }
#      ^            ^  <- this
Default: 1
inline-table-comma-space-width InlineTableCommaSpaceWidth | null
key = { a = 1, b = 2 }
#             ^  <- this
Default: 1
key-value-equals-sign-alignment boolean | null

If true, the equals sign in the key-value pairs will be aligned.

⚠️ WARNING ⚠️
This feature does not apply to key-value pairs inside single line inline tables.

# BEFORE
key = "value1"
key2 = "value2"
key3.key4 = "value3"

# AFTER
key       = "value1"
key2      = "value2"
key3.key4 = "value3"
Default: false
string-quote-style StringQuoteStyle | null
Default: "double"
trailing-comment-alignment boolean | null

If true, the trailing comments in value/key-value pairs will be aligned.

📝 NOTE 📝
The trailing comments of table header are not targeted by alignment.

# BEFORE
key = "value1"  # comment 1
key2 = "value2"  # comment 2
key3.key4 = "value3"  # comment 3

# AFTER
key = "value1"        # comment 1
key2 = "value2"       # comment 2
key3.key4 = "value3"  # comment 3
Default: false
key-value-equals-sign-space-width KeyValueEqualsSignSpaceWidth | null
key = "value"
#  ^ ^  <- this
Default: 1
line-ending LineEnding | null

In TOML, the line ending must be either LF or CRLF.

  • lf: Line Feed only (\n), common on Linux and macOS as well as inside git repos.
  • crlf: Carriage Return Line Feed (\r\n), common on Windows.
Default: "auto"
line-width LineWidth | null

The formatter will try to keep lines within this width.

Default: 80
trailing-comment-space-width TrailingCommentSpaceWidth | null
key = "value"  # trailing comment
#            ^^  <- this
Default: 2
ArrayBracketSpaceWidth integer
ArrayCommaSpaceWidth integer
DateTimeDelimiter string | string | string

DateTime delimiter

IndentStyle string
IndentWidth integer
InlineTableBraceSpaceWidth integer
InlineTableCommaSpaceWidth integer
StringQuoteStyle string | string | string

The preferred quote character for strings.

KeyValueEqualsSignSpaceWidth integer
LineEnding string | string
LineWidth integer
TrailingCommentSpaceWidth integer
LintOptions object
rules LintRules | null
LintRules object
key-empty SeverityLevelDefaultWarn | null

Check if the key is empty.

# VALID BUT DISCOURAGED
"" = true
dotted-keys-out-of-order SeverityLevelDefaultWarn | null

Check if dotted keys are defined out of order.

# VALID BUT DISCOURAGED
apple.type = "fruit"
orange.type = "fruit"
apple.skin = "thin"
orange.skin = "thick"

# RECOMMENDED
apple.type = "fruit"
apple.skin = "thin"
orange.type = "fruit"
orange.skin = "thick"
tables-out-of-order SeverityLevelDefaultWarn | null

Check if tables are defined out of order.

# VALID BUT DISCOURAGED
[fruit.apple]
[animal]
[fruit.orange]

# RECOMMENDED
[fruit.apple]
[fruit.orange]
[animal]
SeverityLevelDefaultWarn
SeverityLevel string
LspOptions object
code-action LspCodeAction | null
completion LspCompletion | null
diagnostic LspDiagnostic | null
document-link LspDocumentLink | null
formatting LspFormatting | null
goto-declaration LspGotoDefinition | null
goto-definition LspGotoDefinition | null
goto-type-definition LspGotoDefinition | null
hover LspHover | null
workspace-diagnostic LspWorkspaceDiagnostic | null
LspCodeAction object
enabled BoolDefaultTrue | null

Whether to enable code action.

BoolDefaultTrue boolean
LspCompletion object
enabled BoolDefaultTrue | null

Whether to enable completion.

LspDiagnostic object
enabled BoolDefaultTrue | null

Whether to enable diagnostic.

LspFormatting object
enabled BoolDefaultTrue | null

Whether to enable formatting.

LspGotoDefinition object
enabled BoolDefaultTrue | null

Whether to enable goto definition.

LspHover object
enabled BoolDefaultTrue | null

Whether to enable hover.

LspWorkspaceDiagnostic object
enabled BoolDefaultTrue | null

Whether to enable workspace diagnostic.

SchemaOverviewOptions object
enabled BoolDefaultTrue | null
strict BoolDefaultTrue | null

If additionalProperties is not specified in the JSON Schema, the strict mode treats it as additionalProperties: false, which is different from the JSON Schema specification.

catalog SchemaCatalog | null
SchemaCatalog object
paths array | null

The catalog is evaluated after the schemas specified by [[schemas]].
Schemas are loaded in order from the beginning of the catalog list.

Default:
[
  "tombi://www.schemastore.org/api/json/catalog.json",
  "https://www.schemastore.org/api/json/catalog.json"
]
SchemaCatalogPath string

Generic value that can be either single or multiple

SchemaItem RootSchema | SubSchema
RootSchema object
path string required
include string[] required

The file match pattern to include the target to apply the schema. Supports glob pattern.

minItems=1
toml-version TomlVersion | null
SubSchema object
root string required
Examples: "tool.tombi", "items[0].name"
minLength=1
path string required
include string[] required

The file match pattern to include the target to apply the sub schema. Supports glob pattern.

minItems=1
OverrideItem object
files required
All of: Files options to override object
format OverrideFormatOptions | null
lint OverrideLintOptions | null
OverrideFilesOptions object
include string[] required

The file match pattern to include in formatting and linting. Supports glob pattern.

minItems=1
exclude array | null

The file match pattern to exclude from formatting and linting. Supports glob pattern.

minItems=1
OverrideFormatOptions object
enabled BoolDefaultTrue | null
rules FormatRules | null
OverrideLintOptions object
enabled BoolDefaultTrue | null
rules LintRules | null