Configuration
A .dollarlint.toml config is recommended for projects, but not
required. Directory validation searches the target root; explicit file validation
searches beside the file. Each run uses one config; nested .dollarlint.toml files are not applied as separate project configs during a parent-directory
run. Use --config to point at a specific config.
Starter config
version = 1
[discovery]
extendExclude = []
useDefaultExcludes = true
respectGitIgnore = true
forceExclude = false
followSymlinks = false
[parsing.json]
mode = "auto"
[schemas]
maxDepth = 8
concurrency = 8
requireCoverage = false
[schemas.optimizations]
enabled = true
[schemas.optimizations.azure]
pruneResources = true
[schemas.fetch]
enabled = true
cache = true
timeout = "10s"
retries = 2
retryMinWait = "250ms"
retryMaxWait = "2s"
allowedDomains = []
blockedDomains = []
[schemas.compile]
timeout = "30s"
[schemas.catalogs]
enabled = true
failure = "warn"
[[schemas.catalogs.sources]]
name = "schemastore"
format = "schemastore"
url = "https://www.schemastore.org/api/json/catalog.json"
enabled = true
[[schemas.associations]]
file = "settings/*.toml"
schema = "./schemas/settings.schema.json"
[output]
showSkipped = false
verbose = false
quiet = false
locations = false
branchErrors = "best"
[[ignore]]
file = "fixtures/*.json"
keyword = "required"
property = "legacyName"
reason = "legacy fixture kept for compatibility"
Format and output file are per-run choices — use --format and --output on dollarlint validate whenever you need JSON, SARIF, or a file
artifact.
Discovery
Leave include unset to use the built-in JSON, JSONC, JSON5, JSON
Lines, YAML, YML, and TOML discovery defaults. Set it only when you want to
replace that default set with custom discovery globs.
Discovery, exclude, association, and ignore-file globs are matched against
slash-separated paths relative to the validation root. A glob without a
slash matches basenames at any depth, so *.json matches both package.json and config/settings.json. Use slashes when you want to
match a particular relative path shape.
| Key | Purpose |
|---|---|
include | Optional replacement discovery globs to consider. Repeatable CLI includes replace config includes for that run. |
extendExclude | Additional discovery globs to ignore, on top of the built-in default excludes. |
useDefaultExcludes | Skip common VCS, dependency, generated, cache, and virtual environment directories. |
respectGitIgnore | Apply .gitignore patterns during directory discovery, including
nested .gitignore files as the walk descends. |
forceExclude | Apply excludes even to explicitly passed files. By default, explicit file targets bypass excludes. |
followSymlinks | Follow symbolic links during discovery. |
Default excludes are intentionally not written out by dollarlint init. Keep project-specific ignores in extendExclude.
Parsing
JSON parsing defaults to auto: ordinary .json
files stay strict, while known JSONC-by-convention files such as tsconfig*.json, jsconfig*.json, .vscode/settings.json, and
devcontainer.json allow comments and trailing commas. Files ending
in .jsonc always use JSONC parsing.
| Key | Purpose |
|---|---|
parsing.json.mode | Choose auto, strict, or jsonc
for files ending in .json. |
Schemas
| Key | Purpose |
|---|---|
maxDepth | Maximum external schema reference depth. |
concurrency | Number of concurrent validation workers. Defaults to GOMAXPROCS. |
requireCoverage | Fail when a discovered included file has no in-file schema, config association, built-in association, or catalog match. |
Associations
Associations map discovered files to schemas when the file does not
declare one itself. DollarLint also has a built-in association for .dollarlint.toml, backed by the embedded config schema; explicit in-file declarations and
user associations still win.
[[schemas.associations]]
file = "settings/*.toml"
schema = "./schemas/settings.schema.json" Association globs are matched against paths relative to the validation root and use the same basename-any-depth behavior as discovery globs. In-file declarations win over associations.
Fetch and compile
| Key | Purpose |
|---|---|
schemas.fetch.enabled | Allow fetching HTTP schemas and catalogs. |
schemas.fetch.cache | Cache successful remote schemas and catalogs on disk for repeat runs. |
schemas.fetch.timeout | Timeout for each schema fetch. |
schemas.fetch.retries | Retries for transient remote schema fetch failures. 408, 425, 429, and retryable 5xx responses are retried. |
schemas.fetch.retryMinWait | Minimum retry backoff. |
schemas.fetch.retryMaxWait | Maximum retry backoff. |
schemas.fetch.allowedDomains | Restrict remote schemas to exact or wildcard hosts. For
SchemaStore, use *.schemastore.org or include both www.schemastore.org and json.schemastore.org. |
schemas.fetch.blockedDomains | Deny hosts even when they match the allowlist. |
schemas.compile.timeout | Timeout for compiling each schema. |
Optimizations
Optimizations reduce expensive schema work without changing validation semantics. They are enabled by default and can be turned off globally or one optimization at a time when you need to debug schema behavior exactly as fetched.
| Key | Purpose |
|---|---|
schemas.optimizations.enabled | Enable or disable schema-specific optimizations as a group. |
schemas.optimizations.azure.pruneResources | For Azure Resource Manager deployment schemas from schema.management.azure.com, compile only the resource provider schemas referenced by the
template instead of the full Azure provider catalog. This keeps
ordinary ARM template validation much faster. Set it to false if you need to inspect or debug the unpruned schema. |
Catalogs
Catalogs map well-known filenames to schemas when a file doesn't declare $schema and no explicit or built-in association matches. SchemaStore is the built-in
catalog source, and custom sources can use the same catalog shape. Explicit
in-file schemas still report schema load or compile failures as issues; the
catalog failure policy only applies to catalog loading and catalog-inferred
schemas.
| Key | Purpose |
|---|---|
schemas.catalogs.enabled | Enable catalog filename matching. |
schemas.catalogs.failure | Choose warn, error, or skip when
a catalog cannot be loaded or a catalog-inferred schema cannot be loaded
or compiled. |
schemas.catalogs.sources | List SchemaStore-format catalog sources. |
schemas.catalogs.sources[].name | Human-readable source name used in schema source metadata and warnings. |
schemas.catalogs.sources[].format | Catalog format. Currently schemastore. |
schemas.catalogs.sources[].url | Remote catalog URL. Mutually exclusive with path. |
schemas.catalogs.sources[].path | Local catalog path. Mutually exclusive with url. |
schemas.catalogs.sources[].enabled | Disable one source without deleting it. |
Ignore rules
[[ignore]]
file = "fixtures/*.json"
keyword = "required"
property = "legacyName"
reason = "legacy fixture kept for compatibility" Ignore rules match validation issues by file glob, JSON Schema keyword, and property. All configured fields must match; omitted fields act like wildcards. Ignored issues are still reported as ignored and do not make the run fail.
Output preferences
Config can set issue-reporting and text-output preferences. Machine-readable formats and output files are intentionally per-run choices.
| Key | Purpose |
|---|---|
output.showSkipped | Show skipped files in text output. |
output.verbose | Show expanded issue metadata in text output. |
output.quiet | Use terse success output. |
output.locations | Include line and column positions in text and JSON output. |
output.branchErrors | Choose best to report the closest matching oneOf/anyOf branch, or all to show every failed
branch leaf when debugging complex schemas. |