prettier-plugin-embed 0.4.10 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +578 -89
- package/dist/embedded/css/options.d.ts +36 -11
- package/dist/embedded/es/options.d.ts +36 -11
- package/dist/embedded/glsl/options.d.ts +36 -11
- package/dist/embedded/graphql/options.d.ts +36 -10
- package/dist/embedded/html/options.d.ts +36 -11
- package/dist/embedded/index.d.ts +2 -2
- package/dist/embedded/ini/options.d.ts +36 -10
- package/dist/embedded/java/options.d.ts +36 -5
- package/dist/embedded/json/options.d.ts +37 -11
- package/dist/embedded/jsonata/options.d.ts +36 -5
- package/dist/embedded/latex/options.d.ts +36 -10
- package/dist/embedded/markdown/options.d.ts +36 -11
- package/dist/embedded/nginx/options.d.ts +36 -5
- package/dist/embedded/noop/options.d.ts +29 -3
- package/dist/embedded/pegjs/options.d.ts +36 -5
- package/dist/embedded/php/options.d.ts +36 -11
- package/dist/embedded/prisma/options.d.ts +36 -5
- package/dist/embedded/properties/options.d.ts +36 -10
- package/dist/embedded/pug/options.d.ts +36 -5
- package/dist/embedded/ruby/options.d.ts +36 -10
- package/dist/embedded/sh/options.d.ts +36 -10
- package/dist/embedded/sql/options.d.ts +36 -11
- package/dist/embedded/toml/options.d.ts +36 -10
- package/dist/embedded/ts/options.d.ts +37 -12
- package/dist/embedded/types.d.ts +8 -2
- package/dist/embedded/utils.d.ts +3 -1
- package/dist/embedded/xml/options.d.ts +36 -11
- package/dist/embedded/yaml/options.d.ts +36 -10
- package/dist/index.js +1537 -1068
- package/dist/options.d.ts +509 -11
- package/dist/types.d.ts +36 -6
- package/dist/utils.d.ts +136 -5
- package/package.json +5 -6
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
|
|
9
|
-
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
|
|
2
|
+
declare const DEFAULT_COMMENTS: readonly ["sh"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["sh"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
10
8
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedShIdentifiers";
|
|
9
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedShComments";
|
|
10
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedShTags";
|
|
11
11
|
export declare const options: {
|
|
12
12
|
readonly embeddedShIdentifiers: {
|
|
13
13
|
readonly category: "Embed";
|
|
@@ -17,16 +17,42 @@ export declare const options: {
|
|
|
17
17
|
readonly value: ["sh"];
|
|
18
18
|
}];
|
|
19
19
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin.";
|
|
20
|
+
readonly deprecated: "Please use `embeddedShComments` or `embeddedShTags`.";
|
|
21
|
+
};
|
|
22
|
+
readonly embeddedShComments: {
|
|
23
|
+
readonly category: "Embed";
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
readonly array: true;
|
|
26
|
+
readonly default: [{
|
|
27
|
+
readonly value: [];
|
|
28
|
+
}];
|
|
29
|
+
readonly description: "Block comments that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin.";
|
|
30
|
+
};
|
|
31
|
+
readonly embeddedShTags: {
|
|
32
|
+
readonly category: "Embed";
|
|
33
|
+
readonly type: "string";
|
|
34
|
+
readonly array: true;
|
|
35
|
+
readonly default: [{
|
|
36
|
+
readonly value: [];
|
|
37
|
+
}];
|
|
38
|
+
readonly description: "Tags that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin.";
|
|
20
39
|
};
|
|
21
40
|
};
|
|
22
41
|
type Options = typeof options;
|
|
23
42
|
declare module "../types.js" {
|
|
24
43
|
interface EmbeddedOptions extends Options {
|
|
25
44
|
}
|
|
26
|
-
interface
|
|
45
|
+
interface EmbeddedDefaultCommentsHolder extends DefaultCommentsHolder {
|
|
46
|
+
}
|
|
47
|
+
interface EmbeddedDefaultTagsHolder extends DefaultTagsHolder {
|
|
27
48
|
}
|
|
28
49
|
interface PluginEmbedOptions {
|
|
29
|
-
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Please use `embeddedShComments` or `embeddedShTags`.
|
|
52
|
+
*/
|
|
53
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
54
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
55
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
30
56
|
}
|
|
31
57
|
}
|
|
32
58
|
export {};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare const DEFAULT_IDENTIFIERS: readonly ["sql"];
|
|
9
|
-
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
|
|
10
|
-
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
|
|
2
|
+
declare const DEFAULT_COMMENTS: readonly ["sql"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["sql"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
11
8
|
declare const SQL_PLUGINS: readonly ["prettier-plugin-sql", "prettier-plugin-sql-cst"];
|
|
12
9
|
type SqlPlugin = (typeof SQL_PLUGINS)[number];
|
|
13
10
|
declare const SQL_CST_PARSERS: readonly ["sqlite", "bigquery", "mysql", "mariadb", "postgresql"];
|
|
14
11
|
type SqlCstParser = (typeof SQL_CST_PARSERS)[number];
|
|
15
12
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedSqlIdentifiers";
|
|
13
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedSqlComments";
|
|
14
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedSqlTags";
|
|
16
15
|
declare const EMBEDDED_LANGUAGE_PLUGIN: "embeddedSqlPlugin";
|
|
17
16
|
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedSqlParser";
|
|
18
17
|
export declare const options: {
|
|
@@ -24,6 +23,25 @@ export declare const options: {
|
|
|
24
23
|
readonly value: ["sql"];
|
|
25
24
|
}];
|
|
26
25
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.";
|
|
26
|
+
readonly deprecated: "Please use `embeddedSqlComments` or `embeddedSqlTags`.";
|
|
27
|
+
};
|
|
28
|
+
readonly embeddedSqlComments: {
|
|
29
|
+
readonly category: "Embed";
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
readonly array: true;
|
|
32
|
+
readonly default: [{
|
|
33
|
+
readonly value: [];
|
|
34
|
+
}];
|
|
35
|
+
readonly description: "Block comments that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.";
|
|
36
|
+
};
|
|
37
|
+
readonly embeddedSqlTags: {
|
|
38
|
+
readonly category: "Embed";
|
|
39
|
+
readonly type: "string";
|
|
40
|
+
readonly array: true;
|
|
41
|
+
readonly default: [{
|
|
42
|
+
readonly value: [];
|
|
43
|
+
}];
|
|
44
|
+
readonly description: "Tags that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.";
|
|
27
45
|
};
|
|
28
46
|
readonly embeddedSqlPlugin: {
|
|
29
47
|
category: string;
|
|
@@ -50,10 +68,17 @@ type Options = typeof options;
|
|
|
50
68
|
declare module "../types.js" {
|
|
51
69
|
interface EmbeddedOptions extends Options {
|
|
52
70
|
}
|
|
53
|
-
interface
|
|
71
|
+
interface EmbeddedDefaultCommentsHolder extends DefaultCommentsHolder {
|
|
72
|
+
}
|
|
73
|
+
interface EmbeddedDefaultTagsHolder extends DefaultTagsHolder {
|
|
54
74
|
}
|
|
55
75
|
interface PluginEmbedOptions {
|
|
56
|
-
|
|
76
|
+
/**
|
|
77
|
+
* @deprecated Please use `embeddedSqlComments` or `embeddedSqlTags`.
|
|
78
|
+
*/
|
|
79
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
80
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
81
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
57
82
|
[EMBEDDED_LANGUAGE_PLUGIN]?: SqlPlugin;
|
|
58
83
|
[EMBEDDED_LANGUAGE_PARSER]?: SqlCstParser;
|
|
59
84
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
|
|
9
|
-
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
|
|
2
|
+
declare const DEFAULT_COMMENTS: readonly ["toml"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["toml"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
10
8
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedTomlIdentifiers";
|
|
9
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedTomlComments";
|
|
10
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedTomlTags";
|
|
11
11
|
export declare const options: {
|
|
12
12
|
readonly embeddedTomlIdentifiers: {
|
|
13
13
|
readonly category: "Embed";
|
|
@@ -17,16 +17,42 @@ export declare const options: {
|
|
|
17
17
|
readonly value: ["toml"];
|
|
18
18
|
}];
|
|
19
19
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin.";
|
|
20
|
+
readonly deprecated: "Please use `embeddedTomlComments` or `embeddedTomlTags`.";
|
|
21
|
+
};
|
|
22
|
+
readonly embeddedTomlComments: {
|
|
23
|
+
readonly category: "Embed";
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
readonly array: true;
|
|
26
|
+
readonly default: [{
|
|
27
|
+
readonly value: [];
|
|
28
|
+
}];
|
|
29
|
+
readonly description: "Block comments that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin.";
|
|
30
|
+
};
|
|
31
|
+
readonly embeddedTomlTags: {
|
|
32
|
+
readonly category: "Embed";
|
|
33
|
+
readonly type: "string";
|
|
34
|
+
readonly array: true;
|
|
35
|
+
readonly default: [{
|
|
36
|
+
readonly value: [];
|
|
37
|
+
}];
|
|
38
|
+
readonly description: "Tags that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin.";
|
|
20
39
|
};
|
|
21
40
|
};
|
|
22
41
|
type Options = typeof options;
|
|
23
42
|
declare module "../types.js" {
|
|
24
43
|
interface EmbeddedOptions extends Options {
|
|
25
44
|
}
|
|
26
|
-
interface
|
|
45
|
+
interface EmbeddedDefaultCommentsHolder extends DefaultCommentsHolder {
|
|
46
|
+
}
|
|
47
|
+
interface EmbeddedDefaultTagsHolder extends DefaultTagsHolder {
|
|
27
48
|
}
|
|
28
49
|
interface PluginEmbedOptions {
|
|
29
|
-
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Please use `embeddedTomlComments` or `embeddedTomlTags`.
|
|
52
|
+
*/
|
|
53
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
54
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
55
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
30
56
|
}
|
|
31
57
|
}
|
|
32
58
|
export {};
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare const DEFAULT_IDENTIFIERS: readonly ["ts", "tsx", "cts", "mts", "typescript"];
|
|
9
|
-
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
|
|
10
|
-
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
|
|
2
|
+
declare const DEFAULT_COMMENTS: readonly ["ts", "tsx", "cts", "mts", "typescript"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["ts", "tsx", "cts", "mts", "typescript"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
11
8
|
declare const TS_PARSERS: readonly ["typescript", "babel-ts"];
|
|
12
9
|
export type TsParser = (typeof TS_PARSERS)[number];
|
|
13
|
-
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedTsParser";
|
|
14
10
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedTsIdentifiers";
|
|
11
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedTsComments";
|
|
12
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedTsTags";
|
|
13
|
+
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedTsParser";
|
|
15
14
|
export declare const options: {
|
|
16
15
|
readonly embeddedTsIdentifiers: {
|
|
17
16
|
readonly category: "Embed";
|
|
@@ -21,6 +20,25 @@ export declare const options: {
|
|
|
21
20
|
readonly value: ["ts", "tsx", "cts", "mts", "typescript"];
|
|
22
21
|
}];
|
|
23
22
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded TypeScript language.";
|
|
23
|
+
readonly deprecated: "Please use `embeddedTsComments` or `embeddedTsTags`.";
|
|
24
|
+
};
|
|
25
|
+
readonly embeddedTsComments: {
|
|
26
|
+
readonly category: "Embed";
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
readonly array: true;
|
|
29
|
+
readonly default: [{
|
|
30
|
+
readonly value: [];
|
|
31
|
+
}];
|
|
32
|
+
readonly description: "Block comments that make their subsequent template literals be identified as embedded TypeScript language.";
|
|
33
|
+
};
|
|
34
|
+
readonly embeddedTsTags: {
|
|
35
|
+
readonly category: "Embed";
|
|
36
|
+
readonly type: "string";
|
|
37
|
+
readonly array: true;
|
|
38
|
+
readonly default: [{
|
|
39
|
+
readonly value: [];
|
|
40
|
+
}];
|
|
41
|
+
readonly description: "Tags that make their subsequent template literals be identified as embedded TypeScript language.";
|
|
24
42
|
};
|
|
25
43
|
readonly embeddedTsParser: {
|
|
26
44
|
category: string;
|
|
@@ -37,10 +55,17 @@ type Options = typeof options;
|
|
|
37
55
|
declare module "../types.js" {
|
|
38
56
|
interface EmbeddedOptions extends Options {
|
|
39
57
|
}
|
|
40
|
-
interface
|
|
58
|
+
interface EmbeddedDefaultCommentsHolder extends DefaultCommentsHolder {
|
|
59
|
+
}
|
|
60
|
+
interface EmbeddedDefaultTagsHolder extends DefaultTagsHolder {
|
|
41
61
|
}
|
|
42
62
|
interface PluginEmbedOptions {
|
|
43
|
-
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated Please use `embeddedTsComments` or `embeddedTsTags`.
|
|
65
|
+
*/
|
|
66
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
67
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
68
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
44
69
|
[EMBEDDED_LANGUAGE_PARSER]?: TsParser;
|
|
45
70
|
}
|
|
46
71
|
}
|
package/dist/embedded/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Options, Parser, SupportOption } from "prettier";
|
|
2
|
+
import type { LiteralUnion } from "type-fest";
|
|
2
3
|
import type { Embedder } from "../types.js";
|
|
3
4
|
import type { Satisfies } from "./utils.js";
|
|
4
5
|
type EmbeddedLanguageNamingConvention = `embedded${Capitalize<string>}`;
|
|
@@ -11,9 +12,14 @@ export interface EmbeddedOptions extends Record<EmbeddedLanguageNamingConvention
|
|
|
11
12
|
export interface EmbeddedLanguagesHolder {
|
|
12
13
|
}
|
|
13
14
|
export type EmbeddedLanguage = Satisfies<EmbeddedLanguageNamingConvention, keyof EmbeddedLanguagesHolder>;
|
|
14
|
-
export interface
|
|
15
|
+
export interface EmbeddedDefaultCommentsHolder {
|
|
15
16
|
}
|
|
16
|
-
export type
|
|
17
|
+
export type EmbeddedDefaultComment = keyof EmbeddedDefaultCommentsHolder;
|
|
18
|
+
export type EmbeddedComment = LiteralUnion<EmbeddedDefaultComment, string>;
|
|
19
|
+
export interface EmbeddedDefaultTagsHolder {
|
|
20
|
+
}
|
|
21
|
+
export type EmbeddedDefaultTag = keyof EmbeddedDefaultTagsHolder;
|
|
22
|
+
export type EmbeddedTag = LiteralUnion<EmbeddedDefaultTag, string>;
|
|
17
23
|
export interface PluginEmbedOptions {
|
|
18
24
|
}
|
|
19
25
|
export {};
|
package/dist/embedded/utils.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare function printTemplateExpression(path: AstPath<Expression & {
|
|
|
8
8
|
}>, print: InternalPrintFun): builders.Doc[];
|
|
9
9
|
export declare function printTemplateExpressions(path: AstPath<TemplateLiteral>, print: InternalPrintFun): builders.Doc[][];
|
|
10
10
|
export declare function simpleRehydrateDoc(doc: Doc, placeholderRegex: RegExp, expressionDocs: Doc[], replaceLiteralNewlinesToHardlines?: boolean): builders.Doc[] | builders.DocCommand;
|
|
11
|
-
export declare function throwIfPluginIsNotFound(pluginName: string, options: Options,
|
|
11
|
+
export declare function throwIfPluginIsNotFound(pluginName: string, options: Options, commentOrTag: string): void;
|
|
12
12
|
export declare function insertLanguage(languages: string[], language: string, firstLanguage: string): void;
|
|
13
13
|
export declare const randomUUID: () => string;
|
|
14
14
|
export declare function preparePlaceholder(leading?: string, trailing?: string): {
|
|
@@ -17,6 +17,8 @@ export declare function preparePlaceholder(leading?: string, trailing?: string):
|
|
|
17
17
|
};
|
|
18
18
|
export declare function escapeRegExp(text: string): string;
|
|
19
19
|
export declare function makeIdentifiersOptionName<T extends string>(language: T): `${T}Identifiers`;
|
|
20
|
+
export declare function makeCommentsOptionName<T extends string>(language: T): `${T}Comments`;
|
|
21
|
+
export declare function makeTagsOptionName<T extends string>(language: T): `${T}Tags`;
|
|
20
22
|
export declare function makePluginOptionName<T extends string>(language: T): `${T}Plugin`;
|
|
21
23
|
export declare function makeParserOptionName<T extends string>(language: T): `${T}Parser`;
|
|
22
24
|
export type AutocompleteStringList<T extends string> = LiteralUnion<T, string>[];
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare const DEFAULT_IDENTIFIERS: readonly ["xml", "opml", "rss", "svg"];
|
|
9
|
-
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
|
|
10
|
-
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
|
|
2
|
+
declare const DEFAULT_COMMENTS: readonly ["xml", "opml", "rss", "svg"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["xml", "opml", "rss", "svg"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
11
8
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedXmlIdentifiers";
|
|
9
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedXmlComments";
|
|
10
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedXmlTags";
|
|
12
11
|
export declare const options: {
|
|
13
12
|
readonly embeddedXmlIdentifiers: {
|
|
14
13
|
readonly category: "Embed";
|
|
@@ -18,6 +17,25 @@ export declare const options: {
|
|
|
18
17
|
readonly value: ["xml", "opml", "rss", "svg"];
|
|
19
18
|
}];
|
|
20
19
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin.";
|
|
20
|
+
readonly deprecated: "Please use `embeddedXmlComments` or `embeddedXmlTags`.";
|
|
21
|
+
};
|
|
22
|
+
readonly embeddedXmlComments: {
|
|
23
|
+
readonly category: "Embed";
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
readonly array: true;
|
|
26
|
+
readonly default: [{
|
|
27
|
+
readonly value: [];
|
|
28
|
+
}];
|
|
29
|
+
readonly description: "Block comments that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin.";
|
|
30
|
+
};
|
|
31
|
+
readonly embeddedXmlTags: {
|
|
32
|
+
readonly category: "Embed";
|
|
33
|
+
readonly type: "string";
|
|
34
|
+
readonly array: true;
|
|
35
|
+
readonly default: [{
|
|
36
|
+
readonly value: [];
|
|
37
|
+
}];
|
|
38
|
+
readonly description: "Tags that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin.";
|
|
21
39
|
};
|
|
22
40
|
/**
|
|
23
41
|
* @internal
|
|
@@ -36,10 +54,17 @@ type Options = typeof options;
|
|
|
36
54
|
declare module "../types.js" {
|
|
37
55
|
interface EmbeddedOptions extends Options {
|
|
38
56
|
}
|
|
39
|
-
interface
|
|
57
|
+
interface EmbeddedDefaultCommentsHolder extends DefaultCommentsHolder {
|
|
58
|
+
}
|
|
59
|
+
interface EmbeddedDefaultTagsHolder extends DefaultTagsHolder {
|
|
40
60
|
}
|
|
41
61
|
interface PluginEmbedOptions {
|
|
42
|
-
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated Please use `embeddedXmlComments` or `embeddedXmlTags`.
|
|
64
|
+
*/
|
|
65
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
66
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
67
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
43
68
|
}
|
|
44
69
|
}
|
|
45
70
|
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
|
|
9
|
-
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
|
|
2
|
+
declare const DEFAULT_COMMENTS: readonly ["yaml", "yml"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["yaml", "yml"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
10
8
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedYamlIdentifiers";
|
|
9
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedYamlComments";
|
|
10
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedYamlTags";
|
|
11
11
|
export declare const options: {
|
|
12
12
|
readonly embeddedYamlIdentifiers: {
|
|
13
13
|
readonly category: "Embed";
|
|
@@ -17,16 +17,42 @@ export declare const options: {
|
|
|
17
17
|
readonly value: ["yaml", "yml"];
|
|
18
18
|
}];
|
|
19
19
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded YAML language.";
|
|
20
|
+
readonly deprecated: "Please use `embeddedYamlComments` or `embeddedYamlTags`.";
|
|
21
|
+
};
|
|
22
|
+
readonly embeddedYamlComments: {
|
|
23
|
+
readonly category: "Embed";
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
readonly array: true;
|
|
26
|
+
readonly default: [{
|
|
27
|
+
readonly value: [];
|
|
28
|
+
}];
|
|
29
|
+
readonly description: "Block comments that make their subsequent template literals be identified as embedded YAML language.";
|
|
30
|
+
};
|
|
31
|
+
readonly embeddedYamlTags: {
|
|
32
|
+
readonly category: "Embed";
|
|
33
|
+
readonly type: "string";
|
|
34
|
+
readonly array: true;
|
|
35
|
+
readonly default: [{
|
|
36
|
+
readonly value: [];
|
|
37
|
+
}];
|
|
38
|
+
readonly description: "Tags that make their subsequent template literals be identified as embedded YAML language.";
|
|
20
39
|
};
|
|
21
40
|
};
|
|
22
41
|
type Options = typeof options;
|
|
23
42
|
declare module "../types.js" {
|
|
24
43
|
interface EmbeddedOptions extends Options {
|
|
25
44
|
}
|
|
26
|
-
interface
|
|
45
|
+
interface EmbeddedDefaultCommentsHolder extends DefaultCommentsHolder {
|
|
46
|
+
}
|
|
47
|
+
interface EmbeddedDefaultTagsHolder extends DefaultTagsHolder {
|
|
27
48
|
}
|
|
28
49
|
interface PluginEmbedOptions {
|
|
29
|
-
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Please use `embeddedYamlComments` or `embeddedYamlTags`.
|
|
52
|
+
*/
|
|
53
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
54
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
55
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
30
56
|
}
|
|
31
57
|
}
|
|
32
58
|
export {};
|