Reference

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
includeOptional replacement discovery globs to consider. Repeatable CLI includes replace config includes for that run.
extendExcludeAdditional discovery globs to ignore, on top of the built-in default excludes.
useDefaultExcludesSkip common VCS, dependency, generated, cache, and virtual environment directories.
respectGitIgnoreApply .gitignore patterns during directory discovery, including nested .gitignore files as the walk descends.
forceExcludeApply excludes even to explicitly passed files. By default, explicit file targets bypass excludes.
followSymlinksFollow 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.modeChoose auto, strict, or jsonc for files ending in .json.

Schemas

Key Purpose
maxDepthMaximum external schema reference depth.
concurrencyNumber of concurrent validation workers. Defaults to GOMAXPROCS.
requireCoverageFail 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.enabledAllow fetching HTTP schemas and catalogs.
schemas.fetch.cacheCache successful remote schemas and catalogs on disk for repeat runs.
schemas.fetch.timeoutTimeout for each schema fetch.
schemas.fetch.retriesRetries for transient remote schema fetch failures. 408, 425, 429, and retryable 5xx responses are retried.
schemas.fetch.retryMinWaitMinimum retry backoff.
schemas.fetch.retryMaxWaitMaximum retry backoff.
schemas.fetch.allowedDomainsRestrict remote schemas to exact or wildcard hosts. For SchemaStore, use *.schemastore.org or include both www.schemastore.org and json.schemastore.org.
schemas.fetch.blockedDomainsDeny hosts even when they match the allowlist.
schemas.compile.timeoutTimeout 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.enabledEnable or disable schema-specific optimizations as a group.
schemas.optimizations.azure.pruneResourcesFor 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.enabledEnable catalog filename matching.
schemas.catalogs.failureChoose warn, error, or skip when a catalog cannot be loaded or a catalog-inferred schema cannot be loaded or compiled.
schemas.catalogs.sourcesList SchemaStore-format catalog sources.
schemas.catalogs.sources[].nameHuman-readable source name used in schema source metadata and warnings.
schemas.catalogs.sources[].formatCatalog format. Currently schemastore.
schemas.catalogs.sources[].urlRemote catalog URL. Mutually exclusive with path.
schemas.catalogs.sources[].pathLocal catalog path. Mutually exclusive with url.
schemas.catalogs.sources[].enabledDisable 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.showSkippedShow skipped files in text output.
output.verboseShow expanded issue metadata in text output.
output.quietUse terse success output.
output.locationsInclude line and column positions in text and JSON output.
output.branchErrorsChoose best to report the closest matching oneOf/anyOf branch, or all to show every failed branch leaf when debugging complex schemas.