UNPKG

prettier-plugin-embed

Version:

A configurable Prettier plugin to format embedded languages in JS/TS files.

51 lines (50 loc) 2.25 kB
import type { EmbeddedDefaultComment, EmbeddedDefaultTag } from "../types.js"; import { type AutocompleteStringList } from "../utils.js"; type EmbeddedCommentsOrTags = AutocompleteStringList<EmbeddedDefaultComment | EmbeddedDefaultTag>; declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedNoopIdentifiers"; declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedNoopComments"; declare const EMBEDDED_LANGUAGE_TAGS: "embeddedNoopTags"; export declare const options: { readonly embeddedNoopIdentifiers: { readonly category: "Embed"; readonly type: "string"; readonly array: true; readonly default: [{ readonly value: []; }]; readonly description: "Tag or comment identifiers that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."; readonly deprecated: "Please use `embeddedNoopComments` or `embeddedNoopTags`."; }; readonly embeddedNoopComments: { readonly category: "Embed"; readonly type: "string"; readonly array: true; readonly default: [{ readonly value: ["9ff2b366e8ca4c97b9aed1a29b5b94ed"]; }]; readonly description: "Block comments that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."; }; readonly embeddedNoopTags: { readonly category: "Embed"; readonly type: "string"; readonly array: true; readonly default: [{ readonly value: ["9ff2b366e8ca4c97b9aed1a29b5b94ed"]; }]; readonly description: "Tags that prevent their subsequent template literals from being identified as embedded languages and thus from being formatted."; }; }; type Options = typeof options; declare module "../types.js" { interface EmbeddedOptions extends Options { } interface PluginEmbedOptions { /** * @deprecated Please use `embeddedNoopComments` or `embeddedNoopTags`. */ [EMBEDDED_LANGUAGE_IDENTIFIERS]?: EmbeddedCommentsOrTags; [EMBEDDED_LANGUAGE_COMMENTS]?: EmbeddedCommentsOrTags; [EMBEDDED_LANGUAGE_TAGS]?: EmbeddedCommentsOrTags; } } export {};