import { type LintResolver } from '@amritk/lint'; /** How `mjst lint` dereferences `$ref` (and `$dynamicRef`/`$recursiveRef`). */ export type ResolverOptions = { /** * Fetch http(s) `$ref`s. Defaults to `false`: a lint run should not make * network calls unless asked. A non-empty `allowedHosts` implies `remote`. */ remote?: boolean; /** If set, only these hosts may be fetched (and each bypasses the private-host guard). */ allowedHosts?: string[]; /** Permit remote refs to private/loopback/link-local hosts (off by default as an SSRF guard). */ allowPrivateHosts?: boolean; /** * Extra directories a local `$ref` may resolve into, on top of the linted * document's own directory (which is always allowed). Empty by default, which * keeps a `$ref` from walking out of the tree the document belongs to. * Relative entries are resolved against the process working directory. */ allowedRoots?: string[]; }; /** * Builds a {@link LintResolver} backed by `@amritk/resolve-refs`, dereferencing * `$ref`, `$dynamicRef`/`$dynamicAnchor`, and `$recursiveRef`/`$recursiveAnchor` * so rules with `resolved: true` (the ruleset default) see through references. * * Internal-only documents resolve in memory. A document with cross-file/remote * refs is resolved from disk **only when its source file reads back exactly as * the linted input** — so a piped document (`--stdin-filepath`) never resolves * against a different on-disk file — with remote fetching gated by `options`. * * A multi-document root (a YAML `---` stream) is resolved one document at a * time, each as a root of its own — `#/…` points into the document the `$ref` * is written in, and so does a `$ref` naming the root file — and the results * are put back into the array the linter reads the stream as. */ export declare const createLintResolver: (options?: ResolverOptions) => LintResolver;