prettier-plugin-embed
Advanced tools
Comparing version 0.4.8 to 0.4.9
@@ -9,3 +9,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["css"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
@@ -16,4 +16,2 @@ declare const CSS_PARSERS: readonly ["css", "less", "scss"]; | ||
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedCssParser"; | ||
export interface PrettierPluginDepsOptions { | ||
} | ||
export declare const options: { | ||
@@ -46,3 +44,3 @@ readonly embeddedCssIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
@@ -52,6 +50,2 @@ [EMBEDDED_LANGUAGE_PARSER]?: CssParser; | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -9,3 +9,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["js", "jsx", "es", "es6", "mjs", "cjs", "pac", "javascript"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
@@ -16,4 +16,2 @@ declare const ES_PARSERS: readonly ["babel", "babel-flow", "acorn", "espree", "flow", "meriyah"]; | ||
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedEsParser"; | ||
export interface PrettierPluginDepsOptions { | ||
} | ||
export declare const options: { | ||
@@ -46,3 +44,3 @@ readonly embeddedEsIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
@@ -52,6 +50,2 @@ [EMBEDDED_LANGUAGE_PARSER]?: EsParser; | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -9,7 +9,5 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["glsl", "shader"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedGlslIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
} | ||
export declare const options: { | ||
@@ -32,10 +30,6 @@ readonly embeddedGlslIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -8,7 +8,5 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["graphql", "gql"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedGraphqlIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
} | ||
export declare const options: { | ||
@@ -31,10 +29,6 @@ readonly embeddedGraphqlIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -9,3 +9,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["html", "xhtml"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
@@ -16,4 +16,2 @@ declare const HTML_PARSERS: readonly ["html", "vue", "angular", "lwc"]; | ||
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedHtmlParser"; | ||
export interface PrettierPluginDepsOptions { | ||
} | ||
export declare const options: { | ||
@@ -46,3 +44,3 @@ readonly embeddedHtmlIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
@@ -52,6 +50,2 @@ [EMBEDDED_LANGUAGE_PARSER]?: HtmlParser; | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
export * from "./register.js"; | ||
export type { EmbeddedDefaultIdentifier, EmbeddedEmbedders, EmbeddedLanguage, EmbeddedOptions, EmbeddedParsers, PrettierPluginEmbedOptions, } from "./types.js"; | ||
export type { EmbeddedDefaultIdentifier, EmbeddedEmbedders, EmbeddedLanguage, EmbeddedOptions, EmbeddedParsers, PluginEmbedOptions, } from "./types.js"; | ||
export { makeIdentifiersOptionName, type AutocompleteStringList, } from "./utils.js"; |
@@ -8,8 +8,5 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["ini", "cfg", "pro"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedIniIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
iniSpaceAroundEquals?: boolean; | ||
} | ||
export declare const options: { | ||
@@ -32,10 +29,6 @@ readonly embeddedIniIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["java"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedJavaIdentifiers"; | ||
/** | ||
* Location: | ||
* https://github.com/jhipster/prettier-java/blob/983a09d890ae832565ceda1a28b3074e061e3cea/packages/prettier-plugin-java/src/options.js | ||
*/ | ||
export interface PrettierPluginDepsOptions { | ||
entrypoint?: "arrayInitializer" | "variableInitializerList" | "block" | "blockStatements" | "blockStatement" | "localVariableDeclarationStatement" | "localVariableDeclaration" | "localVariableType" | "statement" | "statementWithoutTrailingSubstatement" | "emptyStatement" | "labeledStatement" | "expressionStatement" | "statementExpression" | "ifStatement" | "assertStatement" | "switchStatement" | "switchBlock" | "switchBlockStatementGroup" | "switchLabel" | "switchRule" | "caseConstant" | "whileStatement" | "doStatement" | "forStatement" | "basicForStatement" | "forInit" | "forUpdate" | "statementExpressionList" | "enhancedForStatement" | "breakStatement" | "continueStatement" | "returnStatement" | "throwStatement" | "synchronizedStatement" | "tryStatement" | "catches" | "catchClause" | "catchFormalParameter" | "catchType" | "finally" | "tryWithResourcesStatement" | "resourceSpecification" | "resourceList" | "resource" | "yieldStatement" | "variableAccess" | "classDeclaration" | "normalClassDeclaration" | "classModifier" | "typeParameters" | "typeParameterList" | "superclass" | "superinterfaces" | "interfaceTypeList" | "classPermits" | "classBody" | "classBodyDeclaration" | "classMemberDeclaration" | "fieldDeclaration" | "fieldModifier" | "variableDeclaratorList" | "variableDeclarator" | "variableDeclaratorId" | "variableInitializer" | "unannType" | "unannPrimitiveTypeWithOptionalDimsSuffix" | "unannPrimitiveType" | "unannReferenceType" | "unannClassOrInterfaceType" | "unannClassType" | "unannInterfaceType" | "unannTypeVariable" | "methodDeclaration" | "methodModifier" | "methodHeader" | "result" | "methodDeclarator" | "receiverParameter" | "formalParameterList" | "formalParameter" | "variableParaRegularParameter" | "variableArityParameter" | "variableModifier" | "throws" | "exceptionTypeList" | "exceptionType" | "methodBody" | "instanceInitializer" | "staticInitializer" | "constructorDeclaration" | "constructorModifier" | "constructorDeclarator" | "simpleTypeName" | "constructorBody" | "explicitConstructorInvocation" | "unqualifiedExplicitConstructorInvocation" | "qualifiedExplicitConstructorInvocation" | "enumDeclaration" | "enumBody" | "enumConstantList" | "enumConstant" | "enumConstantModifier" | "enumBodyDeclarations" | "recordDeclaration" | "recordHeader" | "recordComponentList" | "recordComponent" | "variableArityRecordComponent" | "recordComponentModifier" | "recordBody" | "recordBodyDeclaration" | "compactConstructorDeclaration" | "isDims" | "expression" | "lambdaExpression" | "lambdaParameters" | "lambdaParametersWithBraces" | "lambdaParameterList" | "inferredLambdaParameterList" | "explicitLambdaParameterList" | "lambdaParameter" | "regularLambdaParameter" | "lambdaParameterType" | "lambdaBody" | "ternaryExpression" | "binaryExpression" | "unaryExpression" | "unaryExpressionNotPlusMinus" | "primary" | "primaryPrefix" | "primarySuffix" | "fqnOrRefType" | "fqnOrRefTypePartRest" | "fqnOrRefTypePartCommon" | "fqnOrRefTypePartFirst" | "parenthesisExpression" | "castExpression" | "primitiveCastExpression" | "referenceTypeCastExpression" | "newExpression" | "unqualifiedClassInstanceCreationExpression" | "classOrInterfaceTypeToInstantiate" | "typeArgumentsOrDiamond" | "diamond" | "methodInvocationSuffix" | "argumentList" | "arrayCreationExpression" | "arrayCreationDefaultInitSuffix" | "arrayCreationExplicitInitSuffix" | "dimExprs" | "dimExpr" | "classLiteralSuffix" | "arrayAccessSuffix" | "methodReferenceSuffix" | "pattern" | "typePattern" | "recordPattern" | "componentPatternList" | "componentPattern" | "unnamedPattern" | "guard" | "isRefTypeInMethodRef" | "interfaceDeclaration" | "normalInterfaceDeclaration" | "interfaceModifier" | "extendsInterfaces" | "interfacePermits" | "interfaceBody" | "interfaceMemberDeclaration" | "constantDeclaration" | "constantModifier" | "interfaceMethodDeclaration" | "interfaceMethodModifier" | "annotationTypeDeclaration" | "annotationTypeBody" | "annotationTypeMemberDeclaration" | "annotationTypeElementDeclaration" | "annotationTypeElementModifier" | "defaultValue" | "annotation" | "elementValuePairList" | "elementValuePair" | "elementValue" | "elementValueArrayInitializer" | "elementValueList" | "literal" | "integerLiteral" | "floatingPointLiteral" | "booleanLiteral" | "moduleName" | "packageName" | "typeName" | "expressionName" | "methodName" | "packageOrTypeName" | "ambiguousName" | "compilationUnit" | "ordinaryCompilationUnit" | "modularCompilationUnit" | "packageDeclaration" | "packageModifier" | "importDeclaration" | "typeDeclaration" | "moduleDeclaration" | "moduleDirective" | "requiresModuleDirective" | "exportsModuleDirective" | "opensModuleDirective" | "usesModuleDirective" | "providesModuleDirective" | "requiresModifier" | "primitiveType" | "numericType" | "integralType" | "floatingPointType" | "referenceType" | "classOrInterfaceType" | "classType" | "interfaceType" | "typeVariable" | "dims" | "typeParameter" | "typeParameterModifier" | "typeBound" | "additionalBound" | "typeArguments" | "typeArgumentList" | "typeArgument" | "wildcard" | "wildcardBounds"; | ||
} | ||
export declare const options: { | ||
@@ -30,10 +23,6 @@ readonly embeddedJavaIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -8,3 +8,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["json", "jsonl"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
@@ -15,4 +15,2 @@ declare const JSON_PARSERS: readonly ["json", "json5", "jsonc", "json-stringify"]; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedJsonIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
} | ||
export declare const options: { | ||
@@ -45,3 +43,3 @@ readonly embeddedJsonIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
@@ -51,6 +49,2 @@ [EMBEDDED_LANGUAGE_PARSER]?: JsonParser; | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["jsonata"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedJsonataIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
} | ||
export declare const options: { | ||
@@ -25,10 +23,6 @@ readonly embeddedJsonataIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -8,7 +8,5 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["latex", "tex", "aux", "cls", "bbl", "bib", "toc", "sty"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedLatexIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
} | ||
export declare const options: { | ||
@@ -31,10 +29,6 @@ readonly embeddedLatexIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { type Options } from "prettier"; | ||
import type { Options } from "prettier"; | ||
import type { Embedder } from "../../types.js"; | ||
@@ -3,0 +3,0 @@ import { language } from "./language.js"; |
@@ -9,3 +9,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["md", "markdown"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
@@ -16,5 +16,2 @@ declare const MARKDOWN_PARSERS: readonly ["markdown", "mdx", "remark"]; | ||
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedMarkdownParser"; | ||
export interface PrettierPluginDepsOptions { | ||
__inJsTemplate?: boolean; | ||
} | ||
export declare const options: { | ||
@@ -47,3 +44,3 @@ readonly embeddedMarkdownIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
@@ -53,6 +50,2 @@ [EMBEDDED_LANGUAGE_PARSER]?: MarkdownParser; | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -1,9 +0,6 @@ | ||
import type { NginxOptions } from "prettier-plugin-nginx"; | ||
import { type AutocompleteStringList, type StringListToInterfaceKey, type UnionToIntersection } from "../utils.js"; | ||
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["nginx"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedNginxIdentifiers"; | ||
export interface PrettierPluginDepsOptions extends Partial<UnionToIntersection<NginxOptions>> { | ||
} | ||
export declare const options: { | ||
@@ -26,10 +23,6 @@ readonly embeddedNginxIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
import type { EmbeddedDefaultIdentifier } from "../types.js"; | ||
import { type AutocompleteStringList } from "../utils.js"; | ||
type EmbeddedIdentifiers = AutocompleteStringList<EmbeddedDefaultIdentifier[]>; | ||
type EmbeddedIdentifiers = AutocompleteStringList<EmbeddedDefaultIdentifier>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedNoopIdentifiers"; | ||
@@ -20,3 +20,3 @@ export declare const options: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: EmbeddedIdentifiers; | ||
@@ -23,0 +23,0 @@ } |
@@ -1,11 +0,6 @@ | ||
import type { EsParser } from "../es/options.js"; | ||
import type { TsParser } from "../ts/options.js"; | ||
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["pegjs", "peggy", "peg"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedPegjsIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
actionParser?: EsParser | TsParser; | ||
} | ||
export declare const options: { | ||
@@ -28,10 +23,6 @@ readonly embeddedPegjsIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -9,10 +9,5 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["php", "php5"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedPhpIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
phpVersion?: "5.0" | "5.1" | "5.2" | "5.3" | "5.4" | "5.5" | "5.6" | "7.0" | "7.1" | "7.2" | "7.3" | "7.4" | "8.0" | "8.1" | "8.2"; | ||
trailingCommaPHP?: boolean; | ||
braceStyle?: "psr-2" | "per-cs" | "1tbs"; | ||
} | ||
export declare const options: { | ||
@@ -35,10 +30,6 @@ readonly embeddedPhpIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["prisma"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedPrismaIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
} | ||
export declare const options: { | ||
@@ -25,10 +23,6 @@ readonly embeddedPrismaIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -8,9 +8,5 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["properties"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedPropertiesIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
escapeNonLatin1?: boolean; | ||
keySeparator?: " " | ":" | "=" | ": " | "= " | " : " | " = "; | ||
} | ||
export declare const options: { | ||
@@ -33,10 +29,6 @@ readonly embeddedPropertiesIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["pug", "jade"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedPugIdentifiers"; | ||
/** | ||
* Location: node_modules/@prettier/plugin-pug/src/printer.ts | ||
*/ | ||
export interface PrettierPluginDepsOptions { | ||
pugPrintWidth?: number; | ||
pugSingleQuote?: boolean; | ||
pugTabWidth?: number; | ||
pugUseTabs?: boolean; | ||
pugBracketSpacing?: boolean; | ||
pugArrowParens?: "avoid" | "always"; | ||
pugSemi?: boolean; | ||
pugBracketSameLine?: boolean; | ||
pugAttributeSeparator?: "always" | "as-needed" | "none"; | ||
pugCommentPreserveSpaces?: "keep-all" | "keep-leading" | "trim-all"; | ||
pugSortAttributes?: "asc" | "desc" | "as-is"; | ||
pugSortAttributesBeginning?: string[]; | ||
pugSortAttributesEnd?: string[]; | ||
pugWrapAttributesThreshold?: number; | ||
pugWrapAttributesPattern?: string; | ||
pugClassLocation?: "before-attributes" | "after-attributes"; | ||
pugClassNotation?: "literal" | "attribute" | "as-is"; | ||
pugIdNotation?: "literal" | "as-is"; | ||
pugEmptyAttributes?: "as-is" | "none" | "all"; | ||
pugEmptyAttributesForceQuotes?: "as-is" | "none" | "all"; | ||
pugSingleFileComponentIndentation?: boolean; | ||
pugFramework?: "auto" | "vue" | "svelte" | "angular"; | ||
pugExplicitDiv?: boolean; | ||
pugPreserveAttributeBrackets?: boolean; | ||
} | ||
export declare const options: { | ||
@@ -52,10 +23,6 @@ readonly embeddedPugIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -7,4 +7,4 @@ import type { EmbeddedEmbedders, EmbeddedLanguage, EmbeddedOptions, EmbeddedParsers } from "./types.js"; | ||
import * as __glob__0_0 from "./css/index.js"; | ||
import * as __glob__0_1 from "./glsl/index.js"; | ||
import * as __glob__0_2 from "./es/index.js"; | ||
import * as __glob__0_1 from "./es/index.js"; | ||
import * as __glob__0_2 from "./glsl/index.js"; | ||
import * as __glob__0_3 from "./graphql/index.js"; | ||
@@ -17,7 +17,7 @@ import * as __glob__0_4 from "./html/index.js"; | ||
import * as __glob__0_9 from "./latex/index.js"; | ||
import * as __glob__0_10 from "./noop/index.js"; | ||
import * as __glob__0_11 from "./markdown/index.js"; | ||
import * as __glob__0_12 from "./php/index.js"; | ||
import * as __glob__0_13 from "./nginx/index.js"; | ||
import * as __glob__0_14 from "./pegjs/index.js"; | ||
import * as __glob__0_10 from "./markdown/index.js"; | ||
import * as __glob__0_11 from "./nginx/index.js"; | ||
import * as __glob__0_12 from "./pegjs/index.js"; | ||
import * as __glob__0_13 from "./noop/index.js"; | ||
import * as __glob__0_14 from "./php/index.js"; | ||
import * as __glob__0_15 from "./prisma/index.js"; | ||
@@ -24,0 +24,0 @@ import * as __glob__0_16 from "./properties/index.js"; |
@@ -8,17 +8,8 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["ruby"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const RUBY_PARSERS: readonly ["ruby", "rbs", "haml"]; | ||
export type RubyParser = (typeof RUBY_PARSERS)[number]; | ||
declare const EMBEDDED_LANGUAGE_PARSER = "embeddedRubyParser"; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedRubyIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
rubyPlugins?: AutocompleteStringList<[ | ||
"plugin/single_quotes", | ||
"plugin/trailing_comma", | ||
"plugin/disable_auto_ternary" | ||
]>; | ||
rubySingleQuote?: boolean; | ||
rubyExecutablePath?: string; | ||
} | ||
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedRubyParser"; | ||
export declare const options: { | ||
@@ -51,3 +42,3 @@ readonly embeddedRubyIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
@@ -57,6 +48,2 @@ [EMBEDDED_LANGUAGE_PARSER]?: RubyParser; | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -1,3 +0,2 @@ | ||
import type { ShParserOptions } from "prettier-plugin-sh"; | ||
import { type AutocompleteStringList, type StringListToInterfaceKey, type UnionToIntersection } from "../utils.js"; | ||
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
/** | ||
@@ -9,7 +8,5 @@ * References: | ||
declare const DEFAULT_IDENTIFIERS: readonly ["sh"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedShIdentifiers"; | ||
export interface PrettierPluginDepsOptions extends Partial<UnionToIntersection<ShParserOptions>> { | ||
} | ||
export declare const options: { | ||
@@ -32,10 +29,6 @@ readonly embeddedShIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -1,4 +0,2 @@ | ||
import type { SqlBaseOptions as PrettierPluginSqlOptions } from "prettier-plugin-sql"; | ||
import type { SqlPluginOptions as PrettierPluginSqlCstRequiredOptions } from "prettier-plugin-sql-cst"; | ||
import { type AutocompleteStringList, type StringListToInterfaceKey, type UnionToIntersection } from "../utils.js"; | ||
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
/** | ||
@@ -11,3 +9,3 @@ * References | ||
declare const DEFAULT_IDENTIFIERS: readonly ["sql"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
@@ -21,5 +19,2 @@ declare const SQL_PLUGINS: readonly ["prettier-plugin-sql", "prettier-plugin-sql-cst"]; | ||
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedSqlParser"; | ||
type PrettierPluginSqlCstOptions = Partial<PrettierPluginSqlCstRequiredOptions>; | ||
export interface PrettierPluginDepsOptions extends UnionToIntersection<PrettierPluginSqlOptions>, PrettierPluginSqlCstOptions { | ||
} | ||
export declare const options: { | ||
@@ -51,3 +46,3 @@ readonly embeddedSqlIdentifiers: { | ||
choices: { | ||
value: "sqlite" | "bigquery" | "mysql" | "mariadb" | "postgresql"; | ||
value: "bigquery" | "mariadb" | "mysql" | "postgresql" | "sqlite"; | ||
description: string; | ||
@@ -63,3 +58,3 @@ }[]; | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
@@ -70,6 +65,2 @@ [EMBEDDED_LANGUAGE_PLUGIN]?: SqlPlugin; | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -1,3 +0,2 @@ | ||
import type { PrettierTaploOptions } from "prettier-plugin-toml"; | ||
import { type AutocompleteStringList, type StringListToInterfaceKey, type UnionToIntersection } from "../utils.js"; | ||
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
/** | ||
@@ -9,7 +8,5 @@ * References: | ||
declare const DEFAULT_IDENTIFIERS: readonly ["toml"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedTomlIdentifiers"; | ||
export interface PrettierPluginDepsOptions extends UnionToIntersection<PrettierTaploOptions> { | ||
} | ||
export declare const options: { | ||
@@ -32,10 +29,6 @@ readonly embeddedTomlIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -9,3 +9,3 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["ts", "tsx", "cts", "mts", "typescript"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
@@ -16,4 +16,2 @@ declare const TS_PARSERS: readonly ["typescript", "babel-ts"]; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedTsIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
} | ||
export declare const options: { | ||
@@ -46,3 +44,3 @@ readonly embeddedTsIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
@@ -52,6 +50,2 @@ [EMBEDDED_LANGUAGE_PARSER]?: TsParser; | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -17,4 +17,4 @@ import type { Options, Parser, SupportOption } from "prettier"; | ||
export type EmbeddedDefaultIdentifier = keyof EmbeddedDefaultIdentifiersHolder; | ||
export interface PrettierPluginEmbedOptions { | ||
export interface PluginEmbedOptions { | ||
} | ||
export {}; |
import type { Comment, Expression, TemplateLiteral } from "estree"; | ||
import type { AstPath, Doc, Options } from "prettier"; | ||
import { builders } from "prettier/doc"; | ||
import type { LiteralUnion, OmitIndexSignature, UnionToIntersection } from "type-fest"; | ||
import type { InternalPrintFun } from "../types.js"; | ||
@@ -21,3 +22,3 @@ export declare function printTemplateExpression(path: AstPath<Expression & { | ||
export declare function makeParserOptionName<T extends string>(language: T): `${T}Parser`; | ||
export type AutocompleteStringList<T extends readonly string[]> = (T[number][] & string[]) | string[]; | ||
export type AutocompleteStringList<T extends string> = LiteralUnion<T, string>[]; | ||
export type StringListToInterfaceKey<T extends readonly string[]> = { | ||
@@ -27,2 +28,4 @@ [key in T[number]]: undefined; | ||
export type Satisfies<U, T extends U> = T; | ||
export type UnionToIntersection<U> = (U extends unknown ? (x: U) => void : never) extends (x: infer I) => void ? I : never; | ||
export type NormalizeOptions<T> = OmitIndexSignature<{ | ||
[k in keyof UnionToIntersection<T>]?: k extends keyof T ? T[k] : UnionToIntersection<T>[k]; | ||
}>; |
@@ -9,11 +9,5 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["xml", "opml", "rss", "svg"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedXmlIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
xmlSelfClosingSpace?: boolean; | ||
xmlWhitespaceSensitivity?: "strict" | "preserve" | "ignore"; | ||
xmlSortAttributesByKey?: boolean; | ||
xmlQuoteAttributes?: "preserve" | "single" | "double"; | ||
} | ||
export declare const options: { | ||
@@ -48,10 +42,6 @@ readonly embeddedXmlIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -0,1 +1,2 @@ | ||
// @ts-nocheck | ||
import type { CstNode } from "chevrotain"; | ||
@@ -2,0 +3,0 @@ import type { Parser } from "prettier"; |
@@ -8,7 +8,5 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js"; | ||
declare const DEFAULT_IDENTIFIERS: readonly ["yaml", "yml"]; | ||
type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>; | ||
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>; | ||
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>; | ||
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedYamlIdentifiers"; | ||
export interface PrettierPluginDepsOptions { | ||
} | ||
export declare const options: { | ||
@@ -31,10 +29,6 @@ readonly embeddedYamlIdentifiers: { | ||
} | ||
interface PrettierPluginEmbedOptions { | ||
interface PluginEmbedOptions { | ||
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers; | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginDepsOptions { | ||
} | ||
} | ||
export {}; |
@@ -1,5 +0,10 @@ | ||
export * from "./embedded/index.js"; | ||
export { options } from "./options.js"; | ||
export { parsers } from "./parsers.js"; | ||
export { printers } from "./printers.js"; | ||
export type * from "./types.js"; | ||
export type { PluginEmbedOptions } from "./embedded/index.js"; | ||
export type { EmbeddedOverride } from "./types.js"; | ||
export type { | ||
/** | ||
* @deprecated Renamed to `PluginEmbedOptions` | ||
*/ | ||
PluginEmbedOptions as PrettierPluginEmbedOptions, } from "./embedded/index.js"; |
@@ -1,2 +0,2 @@ | ||
import { builders as $, utils as Bt } from "prettier/doc"; | ||
import { builders as $, utils as Ut } from "prettier/doc"; | ||
import hn from "prettier/parser-babel"; | ||
@@ -12,7 +12,7 @@ import fn from "prettier/parser-espree"; | ||
import { resolveConfigFile as Sn } from "prettier"; | ||
const { group: Ln, indent: kn, softline: he, hardline: On, lineSuffixBoundary: An } = $, { mapDoc: Mn } = Bt; | ||
const { group: Ln, indent: kn, softline: fe, hardline: On, lineSuffixBoundary: An } = $, { mapDoc: Mn } = Ut; | ||
function Pn(e, t) { | ||
const { node: n } = e; | ||
let r = t(); | ||
return n?.comments?.length && (r = Ln([kn([he, r]), he])), ["${", r, An, "}"]; | ||
return n?.comments?.length && (r = Ln([kn([fe, r]), fe])), ["${", r, An, "}"]; | ||
} | ||
@@ -103,6 +103,6 @@ function T(e, t) { | ||
} | ||
function A(e) { | ||
function O(e) { | ||
return `${e}Parser`; | ||
} | ||
const { line: fe, group: M, indent: be, softline: Ee } = $, Rn = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
const { line: be, group: M, indent: Ee, softline: _e } = $, Rn = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
const o = { | ||
@@ -124,14 +124,14 @@ ...r, | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [M(i)] : be([M(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [M(i)] : Ee([M(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? fe : Ee, v = u.length ? fe : Ee; | ||
const f = l.length ? be : _e, v = u.length ? be : _e; | ||
return M([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, M(i)] : be([f, M(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, M(i)] : Ee([f, M(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, ae = "embeddedCss", Fn = ["css"], wn = ["css", "less", "scss"], Bn = I(ae), Un = A(ae), Wn = { | ||
}, ae = "embeddedCss", Fn = ["css"], wn = ["css", "less", "scss"], Bn = I(ae), Un = O(ae), Wn = { | ||
[Bn]: { | ||
@@ -159,3 +159,3 @@ category: "Embed", | ||
options: Wn | ||
}, Symbol.toStringTag, { value: "Module" })), { line: _e, group: P, indent: ye, softline: ve } = $, Gn = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: ye, group: P, indent: ve, softline: $e } = $, Gn = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
const o = { | ||
@@ -177,10 +177,10 @@ ...r, | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [P(i)] : ye([P(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [P(i)] : ve([P(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? _e : ve, v = u.length ? _e : ve; | ||
const f = l.length ? ye : $e, v = u.length ? ye : $e; | ||
return P([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, P(i)] : ye([f, P(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, P(i)] : ve([f, P(i)]), | ||
v, | ||
@@ -205,3 +205,3 @@ "`" | ||
"meriyah" | ||
], Kn = I(ce), Jn = A(ce), Hn = { | ||
], Kn = I(ce), Jn = O(ce), Hn = { | ||
[Kn]: { | ||
@@ -229,3 +229,3 @@ category: "Embed", | ||
options: Hn | ||
}, Symbol.toStringTag, { value: "Module" })), { line: $e, group: j, indent: Ie, softline: De } = $, Yn = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Ie, group: j, indent: De, softline: Te } = $, Yn = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("prettier-plugin-glsl", r, s); | ||
@@ -248,14 +248,14 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [j(i)] : Ie([j(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [j(i)] : De([j(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? $e : De, v = u.length ? $e : De; | ||
const f = l.length ? Ie : Te, v = u.length ? Ie : Te; | ||
return j([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, j(i)] : Ie([f, j(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, j(i)] : De([f, j(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, Ut = "embeddedGlsl", Qn = ["glsl", "shader"], Vn = I(Ut), Zn = { | ||
}, Wt = "embeddedGlsl", Qn = ["glsl", "shader"], Vn = I(Wt), Zn = { | ||
[Vn]: { | ||
@@ -271,5 +271,5 @@ category: "Embed", | ||
embedder: Yn, | ||
language: Ut, | ||
language: Wt, | ||
options: Zn | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Te, group: N, indent: xe, softline: Se } = $, to = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: xe, group: N, indent: Se, softline: Le } = $, to = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
const o = { | ||
@@ -291,14 +291,14 @@ ...r, | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [N(i)] : xe([N(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [N(i)] : Se([N(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? Te : Se, v = u.length ? Te : Se; | ||
const f = l.length ? xe : Le, v = u.length ? xe : Le; | ||
return N([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, N(i)] : xe([f, N(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, N(i)] : Se([f, N(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, Wt = "embeddedGraphql", no = ["graphql", "gql"], oo = I(Wt), so = { | ||
}, qt = "embeddedGraphql", no = ["graphql", "gql"], oo = I(qt), so = { | ||
[oo]: { | ||
@@ -314,5 +314,5 @@ category: "Embed", | ||
embedder: to, | ||
language: Wt, | ||
language: qt, | ||
options: so | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Le, group: R, indent: ke, softline: Oe } = $, { mapDoc: io } = Bt, ao = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: ke, group: R, indent: Oe, softline: Ae } = $, { mapDoc: io } = Ut, ao = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
const o = { | ||
@@ -340,4 +340,4 @@ ...r, | ||
} else { | ||
const O = Number(L); | ||
g.push(b[O]); | ||
const A = Number(L); | ||
g.push(b[A]); | ||
} | ||
@@ -352,14 +352,14 @@ } | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [R(i)] : ke([R(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [R(i)] : Oe([R(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? Le : Oe, v = u.length ? Le : Oe; | ||
const f = l.length ? ke : Ae, v = u.length ? ke : Ae; | ||
return R([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, R(i)] : ke([f, R(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, R(i)] : Oe([f, R(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, de = "embeddedHtml", co = ["html", "xhtml"], lo = ["html", "vue", "angular", "lwc"], uo = I(de), po = A(de), go = { | ||
}, de = "embeddedHtml", co = ["html", "xhtml"], lo = ["html", "vue", "angular", "lwc"], uo = I(de), po = O(de), go = { | ||
[uo]: { | ||
@@ -387,3 +387,3 @@ category: "Embed", | ||
options: go | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Ae, group: F, indent: Me, softline: Pe } = $, ho = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Me, group: F, indent: Pe, softline: je } = $, ho = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("prettier-plugin-ini", r, s); | ||
@@ -406,14 +406,14 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [F(i)] : Me([F(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [F(i)] : Pe([F(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? Ae : Pe, v = u.length ? Ae : Pe; | ||
const f = l.length ? Me : je, v = u.length ? Me : je; | ||
return F([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, F(i)] : Me([f, F(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, F(i)] : Pe([f, F(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, qt = "embeddedIni", fo = ["ini", "cfg", "pro"], bo = I(qt), Eo = { | ||
}, Gt = "embeddedIni", fo = ["ini", "cfg", "pro"], bo = I(Gt), Eo = { | ||
[bo]: { | ||
@@ -429,5 +429,5 @@ category: "Embed", | ||
embedder: ho, | ||
language: qt, | ||
language: Gt, | ||
options: Eo | ||
}, Symbol.toStringTag, { value: "Module" })), { group: w, line: je, softline: Ne, indent: Re } = $, yo = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { group: w, line: Ne, softline: Re, indent: Fe } = $, yo = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("prettier-plugin-java", r, s); | ||
@@ -455,14 +455,14 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [w(i)] : Re([w(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [w(i)] : Fe([w(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? je : Ne, v = u.length ? je : Ne; | ||
const f = l.length ? Ne : Re, v = u.length ? Ne : Re; | ||
return w([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, w(i)] : Re([f, w(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, w(i)] : Fe([f, w(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, Gt = "embeddedJava", vo = ["java"], $o = I(Gt), Io = { | ||
}, Ct = "embeddedJava", vo = ["java"], $o = I(Ct), Io = { | ||
[$o]: { | ||
@@ -478,5 +478,5 @@ category: "Embed", | ||
embedder: yo, | ||
language: Gt, | ||
language: Ct, | ||
options: Io | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Fe, group: B, indent: we, softline: Be } = $, To = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: we, group: B, indent: Be, softline: Ue } = $, To = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
const o = { | ||
@@ -498,10 +498,10 @@ ...r, | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [B(i)] : we([B(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [B(i)] : Be([B(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? Fe : Be, v = u.length ? Fe : Be; | ||
const f = l.length ? we : Ue, v = u.length ? we : Ue; | ||
return B([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, B(i)] : we([f, B(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, B(i)] : Be([f, B(i)]), | ||
v, | ||
@@ -521,3 +521,3 @@ "`" | ||
} | ||
const le = "embeddedJson", So = ["json", "jsonl"], Lo = ["json", "json5", "jsonc", "json-stringify"], ko = A(le), Oo = I(le), Ao = { | ||
const le = "embeddedJson", So = ["json", "jsonl"], Lo = ["json", "json5", "jsonc", "json-stringify"], ko = O(le), Oo = I(le), Ao = { | ||
[Oo]: { | ||
@@ -545,3 +545,3 @@ category: "Embed", | ||
options: Ao | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Ue, group: U, indent: We, softline: qe } = $, Po = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: We, group: U, indent: qe, softline: Ge } = $, Po = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k( | ||
@@ -568,14 +568,14 @@ "@stedi/prettier-plugin-jsonata", | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [U(i)] : We([U(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [U(i)] : qe([U(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? Ue : qe, v = u.length ? Ue : qe; | ||
const f = l.length ? We : Ge, v = u.length ? We : Ge; | ||
return U([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, U(i)] : We([f, U(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, U(i)] : qe([f, U(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, Ct = "embeddedJsonata", jo = ["jsonata"], No = I(Ct), Ro = { | ||
}, zt = "embeddedJsonata", jo = ["jsonata"], No = I(zt), Ro = { | ||
[No]: { | ||
@@ -591,5 +591,5 @@ category: "Embed", | ||
embedder: Po, | ||
language: Ct, | ||
language: zt, | ||
options: Ro | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Ge, group: W, indent: Ce, softline: ze } = $, wo = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Ce, group: W, indent: ze, softline: Ke } = $, wo = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("prettier-plugin-latex", r, s); | ||
@@ -612,14 +612,14 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [W(i)] : Ce([W(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [W(i)] : ze([W(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? Ge : ze, v = u.length ? Ge : ze; | ||
const f = l.length ? Ce : Ke, v = u.length ? Ce : Ke; | ||
return W([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, W(i)] : Ce([f, W(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, W(i)] : ze([f, W(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, zt = "embeddedLatex", Bo = [ | ||
}, Kt = "embeddedLatex", Bo = [ | ||
"latex", | ||
@@ -633,3 +633,3 @@ "tex", | ||
"sty" | ||
], Uo = I(zt), Wo = { | ||
], Uo = I(Kt), Wo = { | ||
[Uo]: { | ||
@@ -645,5 +645,5 @@ category: "Embed", | ||
embedder: wo, | ||
language: zt, | ||
language: Kt, | ||
options: Wo | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Ke, group: q, indent: Je, softline: He } = $, Go = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Je, group: q, indent: He, softline: Xe } = $, Go = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
const o = { | ||
@@ -666,14 +666,14 @@ ...r, | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [q(i)] : Je([q(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [q(i)] : He([q(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? Ke : He, v = u.length ? Ke : He; | ||
const f = l.length ? Je : Xe, v = u.length ? Je : Xe; | ||
return q([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, q(i)] : Je([f, q(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, q(i)] : He([f, q(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, ue = "embeddedMarkdown", Co = ["md", "markdown"], zo = ["markdown", "mdx", "remark"], Ko = I(ue), Jo = A(ue), Ho = { | ||
}, ue = "embeddedMarkdown", Co = ["md", "markdown"], zo = ["markdown", "mdx", "remark"], Ko = I(ue), Jo = O(ue), Ho = { | ||
[Ko]: { | ||
@@ -701,3 +701,3 @@ category: "Embed", | ||
options: Ho | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Xe, group: G, indent: Ye, softline: Qe } = $, Yo = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Ye, group: G, indent: Qe, softline: Ve } = $, Yo = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("prettier-plugin-nginx", r, s); | ||
@@ -720,14 +720,14 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [G(i)] : Ye([G(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [G(i)] : Qe([G(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? Xe : Qe, v = u.length ? Xe : Qe; | ||
const f = l.length ? Ye : Ve, v = u.length ? Ye : Ve; | ||
return G([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, G(i)] : Ye([f, G(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, G(i)] : Qe([f, G(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, Kt = "embeddedNginx", Qo = ["nginx"], Vo = I(Kt), Zo = { | ||
}, Jt = "embeddedNginx", Qo = ["nginx"], Vo = I(Jt), Zo = { | ||
[Vo]: { | ||
@@ -743,3 +743,3 @@ category: "Embed", | ||
embedder: Yo, | ||
language: Kt, | ||
language: Jt, | ||
options: Zo | ||
@@ -758,3 +758,3 @@ }, Symbol.toStringTag, { value: "Module" })), pe = "embeddedNoop", ts = I(pe), ns = { | ||
options: ns | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Ve, group: C, indent: Ze, softline: et } = $, ss = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Ze, group: C, indent: et, softline: tt } = $, ss = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("prettier-plugin-pegjs", r, s); | ||
@@ -777,14 +777,14 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [C(i)] : Ze([C(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [C(i)] : et([C(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? Ve : et, v = u.length ? Ve : et; | ||
const f = l.length ? Ze : tt, v = u.length ? Ze : tt; | ||
return C([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, C(i)] : Ze([f, C(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, C(i)] : et([f, C(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, Jt = "embeddedPegjs", rs = ["pegjs", "peggy", "peg"], is = I(Jt), as = { | ||
}, Ht = "embeddedPegjs", rs = ["pegjs", "peggy", "peg"], is = I(Ht), as = { | ||
[is]: { | ||
@@ -800,5 +800,5 @@ category: "Embed", | ||
embedder: ss, | ||
language: Jt, | ||
language: Ht, | ||
options: as | ||
}, Symbol.toStringTag, { value: "Module" })), { line: tt, group: z, indent: nt, softline: ot } = $, ds = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: nt, group: z, indent: ot, softline: st } = $, ds = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("@prettier/plugin-php", r, s); | ||
@@ -821,14 +821,14 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [z(i)] : nt([z(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [z(i)] : ot([z(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? tt : ot, v = u.length ? tt : ot; | ||
const f = l.length ? nt : st, v = u.length ? nt : st; | ||
return z([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, z(i)] : nt([f, z(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, z(i)] : ot([f, z(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, Ht = "embeddedPhp", ls = ["php", "php5"], us = I(Ht), ps = { | ||
}, Xt = "embeddedPhp", ls = ["php", "php5"], us = I(Xt), ps = { | ||
[us]: { | ||
@@ -844,5 +844,5 @@ category: "Embed", | ||
embedder: ds, | ||
language: Ht, | ||
language: Xt, | ||
options: ps | ||
}, Symbol.toStringTag, { value: "Module" })), { line: st, group: K, indent: rt, softline: it } = $, ms = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: rt, group: K, indent: it, softline: at } = $, ms = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("prettier-plugin-prisma", r, s); | ||
@@ -865,14 +865,14 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [K(i)] : rt([K(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [K(i)] : it([K(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? st : it, v = u.length ? st : it; | ||
const f = l.length ? rt : at, v = u.length ? rt : at; | ||
return K([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, K(i)] : rt([f, K(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, K(i)] : it([f, K(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, Xt = "embeddedPrisma", hs = ["prisma"], fs = I(Xt), bs = { | ||
}, Yt = "embeddedPrisma", hs = ["prisma"], fs = I(Yt), bs = { | ||
[fs]: { | ||
@@ -888,5 +888,5 @@ category: "Embed", | ||
embedder: ms, | ||
language: Xt, | ||
language: Yt, | ||
options: bs | ||
}, Symbol.toStringTag, { value: "Module" })), { line: at, group: J, indent: ct, softline: dt } = $, _s = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: ct, group: J, indent: dt, softline: lt } = $, _s = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("prettier-plugin-properties", r, s); | ||
@@ -909,14 +909,14 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [J(i)] : ct([J(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [J(i)] : dt([J(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? at : dt, v = u.length ? at : dt; | ||
const f = l.length ? ct : lt, v = u.length ? ct : lt; | ||
return J([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, J(i)] : ct([f, J(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, J(i)] : dt([f, J(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, Yt = "embeddedProperties", ys = ["properties"], vs = I(Yt), $s = { | ||
}, Qt = "embeddedProperties", ys = ["properties"], vs = I(Qt), $s = { | ||
[vs]: { | ||
@@ -932,5 +932,5 @@ category: "Embed", | ||
embedder: _s, | ||
language: Yt, | ||
language: Qt, | ||
options: $s | ||
}, Symbol.toStringTag, { value: "Module" })), { group: H, line: lt, softline: ut, indent: pt } = $, Ds = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { group: H, line: ut, softline: pt, indent: gt } = $, Ds = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("@prettier/plugin-pug", r, s); | ||
@@ -958,14 +958,14 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [H(i)] : pt([H(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [H(i)] : gt([H(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? lt : ut, v = u.length ? lt : ut; | ||
const f = l.length ? ut : pt, v = u.length ? ut : pt; | ||
return H([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, H(i)] : pt([f, H(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, H(i)] : gt([f, H(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, Qt = "embeddedPug", Ts = ["pug", "jade"], xs = I(Qt), Ss = { | ||
}, Vt = "embeddedPug", Ts = ["pug", "jade"], xs = I(Vt), Ss = { | ||
[xs]: { | ||
@@ -981,5 +981,5 @@ category: "Embed", | ||
embedder: Ds, | ||
language: Qt, | ||
language: Vt, | ||
options: Ss | ||
}, Symbol.toStringTag, { value: "Module" })), { line: gt, group: X, indent: mt, softline: ht } = $, ks = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: mt, group: X, indent: ht, softline: ft } = $, ks = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("@prettier/plugin-ruby", r, s); | ||
@@ -1002,15 +1002,15 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [X(i)] : mt([X(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [X(i)] : ht([X(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? gt : ht, v = u.length ? gt : ht; | ||
const f = l.length ? mt : ft, v = u.length ? mt : ft; | ||
return X([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, X(i)] : mt([f, X(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, X(i)] : ht([f, X(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, Vt = "embeddedRuby", Os = ["ruby"], As = ["ruby", "rbs", "haml"], Ms = "embeddedRubyParser", Ps = I(Vt), js = { | ||
[Ps]: { | ||
}, ge = "embeddedRuby", Os = ["ruby"], As = ["ruby", "rbs", "haml"], Ms = I(ge), Ps = O(ge), js = { | ||
[Ms]: { | ||
category: "Embed", | ||
@@ -1022,3 +1022,3 @@ type: "string", | ||
}, | ||
[Ms]: { | ||
[Ps]: { | ||
category: "Embed", | ||
@@ -1036,5 +1036,5 @@ type: "choice", | ||
embedder: ks, | ||
language: Vt, | ||
language: ge, | ||
options: js | ||
}, Symbol.toStringTag, { value: "Module" })), { group: Y, line: ft, softline: bt, indent: Et } = $, Rs = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { group: Y, line: bt, softline: Et, indent: _t } = $, Rs = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("prettier-plugin-sh", r, s); | ||
@@ -1062,10 +1062,10 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [Y(i)] : Et([Y(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [Y(i)] : _t([Y(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? ft : bt, v = u.length ? ft : bt; | ||
const f = l.length ? bt : Et, v = u.length ? bt : Et; | ||
return Y([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, Y(i)] : Et([f, Y(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, Y(i)] : _t([f, Y(i)]), | ||
v, | ||
@@ -1088,3 +1088,3 @@ "`" | ||
}, Symbol.toStringTag, { value: "Module" })); | ||
function _t(e, t) { | ||
function yt(e, t) { | ||
var n = Object.keys(e); | ||
@@ -1099,8 +1099,8 @@ if (Object.getOwnPropertySymbols) { | ||
} | ||
function yt(e) { | ||
function vt(e) { | ||
for (var t = 1; t < arguments.length; t++) { | ||
var n = arguments[t] != null ? arguments[t] : {}; | ||
t % 2 ? _t(Object(n), !0).forEach(function(r) { | ||
t % 2 ? yt(Object(n), !0).forEach(function(r) { | ||
Ws(e, r, n[r]); | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : _t(Object(n)).forEach(function(r) { | ||
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : yt(Object(n)).forEach(function(r) { | ||
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r)); | ||
@@ -1132,3 +1132,3 @@ }); | ||
function en(e) { | ||
return t.withOptions = (n) => en(yt(yt({}, e), n)), t; | ||
return t.withOptions = (n) => en(vt(vt({}, e), n)), t; | ||
function t(n, ...r) { | ||
@@ -1162,3 +1162,3 @@ const s = typeof n == "string" ? [n] : n.raw, { | ||
} | ||
const { group: Q, line: vt, softline: $t, indent: It } = $, zs = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
const { group: Q, line: $t, softline: It, indent: Dt } = $, zs = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
const o = { | ||
@@ -1198,10 +1198,10 @@ ...r, | ||
u, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [Q(i)] : It([Q(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [Q(i)] : Dt([Q(i)]), | ||
E, | ||
"`" | ||
]); | ||
const f = u.length ? vt : $t, v = E.length ? vt : $t; | ||
const f = u.length ? $t : It, v = E.length ? $t : It; | ||
return Q([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, Q(i)] : It([f, Q(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, Q(i)] : Dt([f, Q(i)]), | ||
v, | ||
@@ -1216,3 +1216,3 @@ "`" | ||
"postgresql" | ||
], Xs = I(se), Ys = Nn(se), Qs = A(se), Vs = { | ||
], Xs = I(se), Ys = Nn(se), Qs = O(se), Vs = { | ||
[Xs]: { | ||
@@ -1250,3 +1250,3 @@ category: "Embed", | ||
options: Vs | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Dt, group: V, indent: Tt, softline: xt } = $, er = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Tt, group: V, indent: xt, softline: St } = $, er = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("prettier-plugin-toml", r, s); | ||
@@ -1274,10 +1274,10 @@ const o = { | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [V(i)] : Tt([V(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [V(i)] : xt([V(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? Dt : xt, v = u.length ? Dt : xt; | ||
const f = l.length ? Tt : St, v = u.length ? Tt : St; | ||
return V([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, V(i)] : Tt([f, V(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, V(i)] : xt([f, V(i)]), | ||
v, | ||
@@ -1299,3 +1299,3 @@ "`" | ||
options: or | ||
}, Symbol.toStringTag, { value: "Module" })), { line: St, group: Z, indent: Lt, softline: kt } = $, rr = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Lt, group: Z, indent: kt, softline: Ot } = $, rr = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
const o = { | ||
@@ -1320,14 +1320,14 @@ ...r, | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [Z(i)] : Lt([Z(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [Z(i)] : kt([Z(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? St : kt, v = u.length ? St : kt; | ||
const f = l.length ? Lt : Ot, v = u.length ? Lt : Ot; | ||
return Z([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, Z(i)] : Lt([f, Z(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, Z(i)] : kt([f, Z(i)]), | ||
v, | ||
"`" | ||
]); | ||
}, ge = "embeddedTs", ir = ["ts", "tsx", "cts", "mts", "typescript"], ar = ["typescript", "babel-ts"], cr = A(ge), dr = I(ge), lr = { | ||
}, me = "embeddedTs", ir = ["ts", "tsx", "cts", "mts", "typescript"], ar = ["typescript", "babel-ts"], cr = O(me), dr = I(me), lr = { | ||
[dr]: { | ||
@@ -1353,5 +1353,5 @@ category: "Embed", | ||
embedder: rr, | ||
language: ge, | ||
language: me, | ||
options: lr | ||
}, Symbol.toStringTag, { value: "Module" })), me = "embeddedXml", { line: Ot, group: ee, indent: At, softline: re } = $, pr = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), he = "embeddedXml", { line: At, group: ee, indent: Mt, softline: re } = $, pr = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
k("@prettier/plugin-xml", r, s); | ||
@@ -1378,3 +1378,3 @@ const o = { | ||
...o, | ||
parser: me | ||
parser: he | ||
}); | ||
@@ -1389,14 +1389,14 @@ const [S, L] = o.__embeddedXmlFragmentRecoverIndex ?? []; | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [ee(f)] : At([ee(f)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [ee(f)] : Mt([ee(f)]), | ||
u, | ||
"`" | ||
]); | ||
const v = l.length ? Ot : re, m = u.length ? Ot : re; | ||
const v = l.length ? At : re, m = u.length ? At : re; | ||
return ee([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [v, ee(f)] : At([v, ee(f)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [v, ee(f)] : Mt([v, ee(f)]), | ||
m, | ||
"`" | ||
]); | ||
}, gr = ["xml", "opml", "rss", "svg"], mr = I(me), hr = { | ||
}, gr = ["xml", "opml", "rss", "svg"], mr = I(he), hr = { | ||
[mr]: { | ||
@@ -1440,3 +1440,3 @@ category: "Embed", | ||
} | ||
function Mt(e) { | ||
function Pt(e) { | ||
const t = { | ||
@@ -1474,3 +1474,3 @@ loc: { | ||
)) | ||
throw Mt(d); | ||
throw Pt(d); | ||
if (d.message === "Expecting token of type --> OPEN <-- but found --> '' <--") { | ||
@@ -1503,3 +1503,3 @@ o = !0; | ||
} | ||
throw Mt(d); | ||
throw Pt(d); | ||
} | ||
@@ -1540,6 +1540,6 @@ o && nn(c); | ||
embedder: pr, | ||
language: me, | ||
language: he, | ||
options: hr, | ||
parser: br | ||
}, Symbol.toStringTag, { value: "Module" })), { line: Pt, group: te, indent: jt, softline: Nt } = $, yr = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
}, Symbol.toStringTag, { value: "Module" })), { line: jt, group: te, indent: Nt, softline: Rt } = $, yr = async (e, t, n, r, { identifier: s, embeddedOverrideOptions: c }) => { | ||
const o = { | ||
@@ -1561,10 +1561,10 @@ ...r, | ||
l, | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [te(i)] : jt([te(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [te(i)] : Nt([te(i)]), | ||
u, | ||
"`" | ||
]); | ||
const f = l.length ? Pt : Nt, v = u.length ? Pt : Nt; | ||
const f = l.length ? jt : Rt, v = u.length ? jt : Rt; | ||
return te([ | ||
"`", | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, te(i)] : jt([f, te(i)]), | ||
o.noEmbeddedMultiLineIndentation?.includes(s) ? [f, te(i)] : Nt([f, te(i)]), | ||
v, | ||
@@ -1652,3 +1652,3 @@ "`" | ||
} | ||
}, Rt = { | ||
}, Ft = { | ||
// parsers from internal | ||
@@ -1689,3 +1689,3 @@ ...hn.parsers, | ||
} | ||
function Ft(e, t) { | ||
function wt(e, t) { | ||
var n = {}; | ||
@@ -1796,6 +1796,6 @@ for (var r in e) | ||
if (t === void 0 && (t = {}), jr(e)) | ||
return dn(e.fn, Ft(e.options, t)); | ||
return dn(e.fn, wt(e.options, t)); | ||
if (typeof e != "function") | ||
throw new TypeError("You must pass a function to `memoize`."); | ||
var n = t.isEqual, r = n === void 0 ? Nr : n, s = t.isMatchingKey, c = t.isPromise, o = c === void 0 ? !1 : c, d = t.maxSize, p = d === void 0 ? 1 : d, h = t.onCacheAdd, a = t.onCacheChange, l = t.onCacheHit, u = t.transformKey, E = Ft({ | ||
var n = t.isEqual, r = n === void 0 ? Nr : n, s = t.isMatchingKey, c = t.isPromise, o = c === void 0 ? !1 : c, d = t.maxSize, p = d === void 0 ? 1 : d, h = t.onCacheAdd, a = t.onCacheChange, l = t.onCacheHit, u = t.transformKey, E = wt({ | ||
isEqual: r, | ||
@@ -1812,5 +1812,5 @@ isMatchingKey: s, | ||
f && (L = u(L)); | ||
var O = y.length ? b.getKeyIndex(L) : -1; | ||
if (O !== -1) | ||
_ && l(b, E, S), O && (b.orderByLru(y[O], i[O], O), g && a(b, E, S)); | ||
var A = y.length ? b.getKeyIndex(L) : -1; | ||
if (A !== -1) | ||
_ && l(b, E, S), A && (b.orderByLru(y[A], i[A], A), g && a(b, E, S)); | ||
else { | ||
@@ -1824,3 +1824,3 @@ var gn = e.apply(this, arguments), mn = v ? L : oe(arguments); | ||
} | ||
async function wt(e) { | ||
async function Bt(e) { | ||
try { | ||
@@ -1868,3 +1868,3 @@ const t = await vn(e, { encoding: "utf-8" }); | ||
if (r === ".json") { | ||
const s = await n, c = await wt(s); | ||
const s = await n, c = await Bt(s); | ||
if (c !== void 0) | ||
@@ -1890,3 +1890,3 @@ return c; | ||
if (r === "") { | ||
const s = await n, c = await wt(s); | ||
const s = await n, c = await Bt(s); | ||
if (c !== void 0) | ||
@@ -1941,3 +1941,3 @@ return c; | ||
r.parser; | ||
const s = r.parser in Rt, c = r.noEmbeddedIdentificationByTag ?? [], o = /* @__PURE__ */ new Set([ | ||
const s = r.parser in Ft, c = r.noEmbeddedIdentificationByTag ?? [], o = /* @__PURE__ */ new Set([ | ||
"start", | ||
@@ -1961,3 +1961,3 @@ "end", | ||
try { | ||
const a = Rt[r.parser].parse( | ||
const a = Ft[r.parser].parse( | ||
`${d}\`\``, | ||
@@ -2052,10 +2052,5 @@ r | ||
export { | ||
an as embeddedEmbedders, | ||
sn as embeddedLanguages, | ||
cn as embeddedOptions, | ||
rn as embeddedParsers, | ||
I as makeIdentifiersOptionName, | ||
ri as options, | ||
Rt as parsers, | ||
Ft as parsers, | ||
ii as printers | ||
}; |
@@ -1,3 +0,3 @@ | ||
import { type AutocompleteStringList, type EmbeddedDefaultIdentifier, type PrettierPluginEmbedOptions } from "./embedded/index.js"; | ||
type EmbeddedIdentifiers = AutocompleteStringList<EmbeddedDefaultIdentifier[]>; | ||
import { type AutocompleteStringList, type EmbeddedDefaultIdentifier } from "./embedded/index.js"; | ||
type EmbeddedIdentifiers = AutocompleteStringList<EmbeddedDefaultIdentifier>; | ||
declare const NO_EMBEDDED_IDENTIFICATION_BY_COMMENT = "noEmbeddedIdentificationByComment"; | ||
@@ -219,2 +219,11 @@ declare const NO_EMBEDDED_IDENTIFICATION_BY_TAG = "noEmbeddedIdentificationByTag"; | ||
}; | ||
readonly embeddedPegjsIdentifiers: { | ||
readonly category: "Embed"; | ||
readonly type: "string"; | ||
readonly array: true; | ||
readonly default: [{ | ||
readonly value: ["pegjs", "peggy", "peg"]; | ||
}]; | ||
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."; | ||
}; | ||
readonly embeddedTsIdentifiers: { | ||
@@ -239,11 +248,2 @@ readonly category: "Embed"; | ||
}; | ||
readonly embeddedPegjsIdentifiers: { | ||
readonly category: "Embed"; | ||
readonly type: "string"; | ||
readonly array: true; | ||
readonly default: [{ | ||
readonly value: ["pegjs", "peggy", "peg"]; | ||
}]; | ||
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin."; | ||
}; | ||
readonly embeddedPhpIdentifiers: { | ||
@@ -338,3 +338,3 @@ readonly category: "Embed"; | ||
choices: { | ||
value: "sqlite" | "bigquery" | "mysql" | "mariadb" | "postgresql"; | ||
value: "bigquery" | "mariadb" | "mysql" | "postgresql" | "sqlite"; | ||
description: string; | ||
@@ -380,3 +380,3 @@ }[]; | ||
}; | ||
export interface PrettierPluginGlobalOptions { | ||
export interface PluginEmbedLanguageAgnosticOptions { | ||
[NO_EMBEDDED_IDENTIFICATION_BY_COMMENT]?: EmbeddedIdentifiers; | ||
@@ -389,9 +389,5 @@ [NO_EMBEDDED_IDENTIFICATION_BY_TAG]?: EmbeddedIdentifiers; | ||
declare module "./embedded/types.js" { | ||
interface PrettierPluginEmbedOptions extends PrettierPluginGlobalOptions { | ||
interface PluginEmbedOptions extends PluginEmbedLanguageAgnosticOptions { | ||
} | ||
} | ||
declare module "prettier" { | ||
interface Options extends PrettierPluginEmbedOptions { | ||
} | ||
} | ||
export {}; |
import type { TemplateLiteral } from "estree"; | ||
import type { AstPath, Doc, Options } from "prettier"; | ||
import { type AutocompleteStringList, type EmbeddedDefaultIdentifier, type EmbeddedLanguage, type PrettierPluginEmbedOptions, makeIdentifiersOptionName } from "./embedded/index.js"; | ||
import type { PrettierPluginGlobalOptions } from "./options.js"; | ||
import { RemoveIndex } from "./utils.js"; | ||
declare module "estree" { | ||
interface Comment { | ||
leading: boolean; | ||
trailing: boolean; | ||
nodeDescription: string; | ||
} | ||
interface BaseNode { | ||
comments?: Comment[]; | ||
} | ||
interface File extends BaseNode { | ||
type: "File"; | ||
sourceType: "script" | "module"; | ||
program: Program; | ||
} | ||
interface NodeMap { | ||
File: File; | ||
} | ||
} | ||
import type { OmitIndexSignature } from "type-fest"; | ||
import type { AutocompleteStringList, EmbeddedDefaultIdentifier, EmbeddedLanguage, PluginEmbedOptions, makeIdentifiersOptionName } from "./embedded/index.js"; | ||
import type { PluginEmbedLanguageAgnosticOptions } from "./options.js"; | ||
export type InternalPrintFun = (selector?: string | number | (string | number)[] | AstPath<TemplateLiteral>) => Doc; | ||
@@ -32,5 +14,4 @@ export interface EmbedderPayload { | ||
export interface EmbeddedOverride { | ||
identifiers: AutocompleteStringList<EmbeddedDefaultIdentifier[]>; | ||
options: Omit<Omit<RemoveIndex<Options>, keyof PrettierPluginEmbedOptions> & Omit<PrettierPluginEmbedOptions, keyof PrettierPluginGlobalOptions | ReturnType<typeof makeIdentifiersOptionName<EmbeddedLanguage>>>, "printWidth" | "endOfLine" | "useTabs" | "tabWidth" | "parser" | "filepath" | "embeddedLanguageFormatting" | `__${string}`>; | ||
identifiers: AutocompleteStringList<EmbeddedDefaultIdentifier>; | ||
options: Omit<Omit<OmitIndexSignature<Options>, keyof PluginEmbedOptions> & Omit<PluginEmbedOptions, keyof PluginEmbedLanguageAgnosticOptions | ReturnType<typeof makeIdentifiersOptionName<EmbeddedLanguage>>>, "printWidth" | "endOfLine" | "useTabs" | "tabWidth" | "parser" | "filepath" | "embeddedLanguageFormatting" | `__${string}`>; | ||
} | ||
export type EmbeddedOverrides = EmbeddedOverride[]; |
import type { Node } from "estree"; | ||
import { type AstPath, type Options } from "prettier"; | ||
export declare const resolveEmbeddedOverrideOptions: (embeddedOverridesString: string | undefined, identifier: string, sourceFilePath?: string) => Promise<Omit<Omit<RemoveIndex<Options>, keyof import("./index.js").PrettierPluginEmbedOptions> & Omit<import("./index.js").PrettierPluginEmbedOptions, "embeddedNoopIdentifiers" | "embeddedCssIdentifiers" | "embeddedEsIdentifiers" | "embeddedGlslIdentifiers" | "embeddedGraphqlIdentifiers" | "embeddedHtmlIdentifiers" | "embeddedIniIdentifiers" | "embeddedJavaIdentifiers" | "embeddedJsonIdentifiers" | "embeddedJsonataIdentifiers" | "embeddedLatexIdentifiers" | "embeddedMarkdownIdentifiers" | "embeddedNginxIdentifiers" | "embeddedTsIdentifiers" | "embeddedPegjsIdentifiers" | "embeddedPhpIdentifiers" | "embeddedPrismaIdentifiers" | "embeddedPropertiesIdentifiers" | "embeddedPugIdentifiers" | "embeddedRubyIdentifiers" | "embeddedShIdentifiers" | "embeddedSqlIdentifiers" | "embeddedTomlIdentifiers" | "embeddedXmlIdentifiers" | "embeddedYamlIdentifiers" | keyof import("./options.js").PrettierPluginGlobalOptions>, "parser" | "filepath" | "endOfLine" | "embeddedLanguageFormatting" | "printWidth" | "tabWidth" | "useTabs" | `__${string}`> | undefined>; | ||
export declare const resolveEmbeddedOverrideOptions: (embeddedOverridesString: string | undefined, identifier: string, sourceFilePath?: string) => Promise<Omit<Omit<import("type-fest").OmitIndexSignature<Options>, keyof import("./index.js").PluginEmbedOptions> & Omit<import("./index.js").PluginEmbedOptions, "embeddedNoopIdentifiers" | "embeddedCssIdentifiers" | "embeddedEsIdentifiers" | "embeddedGlslIdentifiers" | "embeddedGraphqlIdentifiers" | "embeddedHtmlIdentifiers" | "embeddedIniIdentifiers" | "embeddedJavaIdentifiers" | "embeddedJsonIdentifiers" | "embeddedJsonataIdentifiers" | "embeddedLatexIdentifiers" | "embeddedMarkdownIdentifiers" | "embeddedNginxIdentifiers" | "embeddedPegjsIdentifiers" | "embeddedTsIdentifiers" | "embeddedPhpIdentifiers" | "embeddedPrismaIdentifiers" | "embeddedPropertiesIdentifiers" | "embeddedPugIdentifiers" | "embeddedRubyIdentifiers" | "embeddedShIdentifiers" | "embeddedSqlIdentifiers" | "embeddedTomlIdentifiers" | "embeddedXmlIdentifiers" | "embeddedYamlIdentifiers" | keyof import("./options.js").PluginEmbedLanguageAgnosticOptions>, "parser" | "filepath" | "endOfLine" | "embeddedLanguageFormatting" | "printWidth" | "tabWidth" | "useTabs" | `__${string}`> | undefined>; | ||
export declare function getIdentifierFromComment({ node, parent }: AstPath<Node>, comments: string[], options: Options): string | undefined; | ||
export declare function getIdentifierFromTag({ node, parent }: AstPath<Node>, tags: string[], options: Options): string | undefined; | ||
export type RemoveIndex<T> = { | ||
[K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; | ||
}; |
@@ -5,3 +5,3 @@ { | ||
"private": false, | ||
"version": "0.4.8", | ||
"version": "0.4.9", | ||
"type": "module", | ||
@@ -17,3 +17,19 @@ "files": [ | ||
"default": "./dist/index.js" | ||
} | ||
}, | ||
"./plugin-embed": { | ||
"types": "./dist/plugin-embed.d.ts" | ||
}, | ||
"./embedded/*": { | ||
"types": "./dist/embedded/*.d.ts" | ||
}, | ||
"./embedded/index": null, | ||
"./embedded/register": null, | ||
"./embedded/types": null, | ||
"./embedded/utils": null, | ||
"./embedded/*/index": null, | ||
"./embedded/*/language": null, | ||
"./embedded/*/options": null, | ||
"./embedded/*/embedder": null, | ||
"./embedded/*/parser": null, | ||
"./embedded/*/printer": null | ||
}, | ||
@@ -47,3 +63,4 @@ "repository": { | ||
"scripts": { | ||
"prepare": "husky install", | ||
"prepare": "patch-package", | ||
"update-hooks": "simple-git-hooks", | ||
"bump": "bumpp", | ||
@@ -58,3 +75,8 @@ "dev": "vite", | ||
"add-glob-import-types": "tsx ./scripts/add-glob-import-types.ts", | ||
"postbuild": "tsc --project ./tsconfig.production.json && npm run add-glob-import-types", | ||
"nocheck-chevrotain-types": "tsx ./scripts/nocheck-chevrotain-types.ts", | ||
"copy": "copy-files-from-to", | ||
"postbuild": "tsc --project ./tsconfig.production.json && conc \"npm:add-glob-import-types\" \"npm:nocheck-chevrotain-types\" \"npm:copy\"", | ||
"prebuild:ci": "npm run type-check", | ||
"build:ci": "vite build", | ||
"postbuild:ci": "npm run postbuild", | ||
"test": "vitest", | ||
@@ -68,6 +90,7 @@ "test:ui": "vitest --ui", | ||
"ncu": "npx ncu", | ||
"postncu": "npm i" | ||
"postncu": "npm i", | ||
"bump-biome": "npm i @biomejs/biome@latest --save-exact" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.5.2", | ||
"@biomejs/biome": "1.5.3", | ||
"@commitlint/cli": "^18.4.4", | ||
@@ -80,3 +103,2 @@ "@commitlint/config-conventional": "^18.4.4", | ||
"@stedi/prettier-plugin-jsonata": "^2.1.1", | ||
"@types/estree": "^1.0.5", | ||
"@types/node": "^20.11.5", | ||
@@ -88,7 +110,9 @@ "@vitest/coverage-istanbul": "^1.2.1", | ||
"chevrotain": "7.1.1", | ||
"concurrently": "^8.2.2", | ||
"copy-files-from-to": "^3.9.1", | ||
"esbuild": "^0.19.11", | ||
"fast-glob": "^3.3.2", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^15.2.0", | ||
"npm-check-updates": "^16.14.12", | ||
"patch-package": "^8.0.0", | ||
"prettier": "^3.2.4", | ||
@@ -109,2 +133,3 @@ "prettier-plugin-glsl": "^0.1.3", | ||
"prettier-plugin-toml": "^2.0.1", | ||
"simple-git-hooks": "^2.9.0", | ||
"tsx": "^4.7.0", | ||
@@ -116,6 +141,8 @@ "typescript": "^5.3.3", | ||
"dependencies": { | ||
"@types/estree": "^1.0.5", | ||
"dedent": "^1.5.1", | ||
"micro-memoize": "^4.1.2", | ||
"package-up": "^5.0.0" | ||
"package-up": "^5.0.0", | ||
"type-fest": "^4.9.0" | ||
} | ||
} |
<div align="center"> | ||
![prettier-plugin-embed-light](./asset/prettier-plugin-embed-wide-light.svg) | ||
![prettier-plugin-embed-wide-logo](./asset/prettier-plugin-embed-wide-light.svg) | ||
@@ -170,3 +170,3 @@ # Prettier Plugin Embed | ||
Formatting embedded ECMAScript language doesn't require other plugins and uses the parsers and printers provided by Prettier natively. | ||
Formatting embedded ECMAScript/JavaScript language doesn't require other plugins and uses the parsers and printers provided by Prettier natively. | ||
@@ -270,3 +270,3 @@ If you want to specify different parsers for different identifiers, check [`embeddedOverrides`](#embeddedoverrides). | ||
Formatting embedded Pegjs language requires the [`prettier-plugin-nginx`](https://github.com/jxddk/prettier-plugin-nginx) plugin to be loaded as well. And [options](https://github.com/jxddk/prettier-plugin-nginx?tab=readme-ov-file#configuration) supported by `prettier-plugin-nginx` can therefore be used to further control the formatting behavior. | ||
Formatting embedded NGINX language requires the [`prettier-plugin-nginx`](https://github.com/jxddk/prettier-plugin-nginx) plugin to be loaded as well. And [options](https://github.com/jxddk/prettier-plugin-nginx?tab=readme-ov-file#configuration) supported by `prettier-plugin-nginx` can therefore be used to further control the formatting behavior. | ||
@@ -313,3 +313,3 @@ #### Pegjs | ||
Formatting embedded Shell language requires the [`@prettier/plugin-pug`](https://github.com/prettier/plugin-pug) plugin to be loaded as well. And [options](https://github.com/prettier/plugin-pug?tab=readme-ov-file#configuration) supported by `@prettier/plugin-pug` can therefore be used to further control the formatting behavior. | ||
Formatting embedded Pug language requires the [`@prettier/plugin-pug`](https://github.com/prettier/plugin-pug) plugin to be loaded as well. And [options](https://github.com/prettier/plugin-pug?tab=readme-ov-file#configuration) supported by `@prettier/plugin-pug` can therefore be used to further control the formatting behavior. | ||
@@ -355,3 +355,3 @@ #### Ruby | ||
Formatting embedded TOML language requires the [`prettier-plugin-toml`](https://github.com/un-ts/prettier/tree/master/packages/toml#readme) plugin to be loaded as well. And options supported by `prettier-plugin-toml` can therefore be used to further control the formatting behavior. | ||
Formatting embedded TOML language requires the [`prettier-plugin-toml`](https://github.com/un-ts/prettier/tree/master/packages/toml#readme) plugin to be loaded as well. And [options](https://github.com/un-ts/prettier/blob/master/packages/toml/src/options.ts) supported by `prettier-plugin-toml` can therefore be used to further control the formatting behavior. | ||
@@ -428,2 +428,67 @@ #### TS (TypeScript) | ||
### Typed Options | ||
There're several ways to use the typed options provided by this plugin. Taking the embedded SQL language as an example: | ||
- **Augment the `Options` type from `Prettier` to use plugin-specific options** | ||
Register options from `prettier-plugin-embed` (this plugin): | ||
```ts | ||
/// <reference types="prettier-plugin-embed/plugin-embed" /> | ||
``` | ||
Register options from `prettier-plugin-sql`: | ||
```ts | ||
/// <reference types="prettier-plugin-embed/embedded/sql/plugin-sql" /> | ||
``` | ||
Other embedded languages share the same pattern: | ||
```ts | ||
/// <reference types="prettier-plugin-embed/embedded/<language>/<(no prettier or scope) plugin name>" /> | ||
``` | ||
- **Import plugin-specific options** | ||
Import options from `prettier-plugin-embed` (this plugin): | ||
```ts | ||
import type { PluginEmbedOptions } from "prettier-plugin-embed"; | ||
``` | ||
Import options from `prettier-plugin-sql`: | ||
```ts | ||
import type { PluginSqlOptions } from "prettier-plugin-embed/embedded/sql/plugin-sql-types"; | ||
``` | ||
**NOTE:** You can also import the types from the `prettier-plugin-sql` plugin directly. However, not all of the plugins provide types, or provide them in a predictable way, so this plugin exports them in a more unified manner. | ||
Other embedded languages share the same pattern: | ||
```ts | ||
import type { Plugin<Language>Options } from "prettier-plugin-embed/embedded/<language>/<(no prettier or scope) plugin name>-types"; | ||
``` | ||
- **Use `JSDoc` in JavaScript files** | ||
```js | ||
/** | ||
* @type {import("prettier-plugin-embed").PluginEmbedOptions} | ||
*/ | ||
const pluginEmbedOptions = { | ||
embeddedSqlIdentifiers: ["sql"], | ||
}; | ||
/** | ||
* @type {import("prettier-plugin-embed/embedded/sql/plugin-sql-types").PluginSqlOptions} | ||
*/ | ||
const pluginSqlOptions = { | ||
language: "postgresql", | ||
keywordCase: "upper", | ||
}; | ||
``` | ||
## Contributing | ||
@@ -430,0 +495,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
206769
143
496
5
41
4201
+ Added@types/estree@^1.0.5
+ Addedtype-fest@^4.9.0
+ Added@types/estree@1.0.6(transitive)
+ Addedtype-fest@4.27.0(transitive)