prettier-plugin-embed 0.4.10 → 0.4.12
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 +1570 -1087
- package/dist/options.d.ts +509 -11
- package/dist/types.d.ts +36 -6
- package/dist/utils.d.ts +136 -5
- package/package.json +14 -17
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare const DEFAULT_IDENTIFIERS: readonly ["css"];
|
|
9
|
-
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
|
|
10
|
-
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
|
|
2
|
+
declare const DEFAULT_COMMENTS: readonly ["css"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["css"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
11
8
|
declare const CSS_PARSERS: readonly ["css", "less", "scss"];
|
|
12
9
|
type CssParser = (typeof CSS_PARSERS)[number];
|
|
13
10
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedCssIdentifiers";
|
|
11
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedCssComments";
|
|
12
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedCssTags";
|
|
14
13
|
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedCssParser";
|
|
15
14
|
export declare const options: {
|
|
16
15
|
readonly embeddedCssIdentifiers: {
|
|
@@ -21,6 +20,25 @@ export declare const options: {
|
|
|
21
20
|
readonly value: ["css"];
|
|
22
21
|
}];
|
|
23
22
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded CSS language.";
|
|
23
|
+
readonly deprecated: "Please use `embeddedCssComments` or `embeddedCssTags`.";
|
|
24
|
+
};
|
|
25
|
+
readonly embeddedCssComments: {
|
|
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 CSS language.";
|
|
33
|
+
};
|
|
34
|
+
readonly embeddedCssTags: {
|
|
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 CSS language.";
|
|
24
42
|
};
|
|
25
43
|
readonly embeddedCssParser: {
|
|
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 `embeddedCssComments` or `embeddedCssTags`.,
|
|
65
|
+
*/
|
|
66
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
67
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
68
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
44
69
|
[EMBEDDED_LANGUAGE_PARSER]?: CssParser;
|
|
45
70
|
}
|
|
46
71
|
}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare const DEFAULT_IDENTIFIERS: readonly ["js", "jsx", "es", "es6", "mjs", "cjs", "pac", "javascript"];
|
|
9
|
-
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
|
|
10
|
-
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
|
|
2
|
+
declare const DEFAULT_COMMENTS: readonly ["js", "jsx", "es", "es6", "mjs", "cjs", "pac", "javascript"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["js", "jsx", "es", "es6", "mjs", "cjs", "pac", "javascript"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
11
8
|
declare const ES_PARSERS: readonly ["babel", "babel-flow", "acorn", "espree", "flow", "meriyah"];
|
|
12
9
|
export type EsParser = (typeof ES_PARSERS)[number];
|
|
13
10
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedEsIdentifiers";
|
|
11
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedEsComments";
|
|
12
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedEsTags";
|
|
14
13
|
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedEsParser";
|
|
15
14
|
export declare const options: {
|
|
16
15
|
readonly embeddedEsIdentifiers: {
|
|
@@ -21,6 +20,25 @@ export declare const options: {
|
|
|
21
20
|
readonly value: ["js", "jsx", "es", "es6", "mjs", "cjs", "pac", "javascript"];
|
|
22
21
|
}];
|
|
23
22
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language.";
|
|
23
|
+
readonly deprecated: "Please use `embeddedEsComments` or `embeddedEsTags`.";
|
|
24
|
+
};
|
|
25
|
+
readonly embeddedEsComments: {
|
|
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 ECMAScript/JavaScript language.";
|
|
33
|
+
};
|
|
34
|
+
readonly embeddedEsTags: {
|
|
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 ECMAScript/JavaScript language.";
|
|
24
42
|
};
|
|
25
43
|
readonly embeddedEsParser: {
|
|
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 `embeddedEsComments` or `embeddedEsTags`.
|
|
65
|
+
*/
|
|
66
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
67
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
68
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
44
69
|
[EMBEDDED_LANGUAGE_PARSER]?: EsParser;
|
|
45
70
|
}
|
|
46
71
|
}
|
|
@@ -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 ["glsl", "shader"];
|
|
9
|
-
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
|
|
10
|
-
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
|
|
2
|
+
declare const DEFAULT_COMMENTS: readonly ["glsl", "shader"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["glsl", "shader"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
11
8
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedGlslIdentifiers";
|
|
9
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedGlslComments";
|
|
10
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedGlslTags";
|
|
12
11
|
export declare const options: {
|
|
13
12
|
readonly embeddedGlslIdentifiers: {
|
|
14
13
|
readonly category: "Embed";
|
|
@@ -18,16 +17,42 @@ export declare const options: {
|
|
|
18
17
|
readonly value: ["glsl", "shader"];
|
|
19
18
|
}];
|
|
20
19
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin.";
|
|
20
|
+
readonly deprecated: "Please use `embeddedGlslComments` or `embeddedGlslTags`.";
|
|
21
|
+
};
|
|
22
|
+
readonly embeddedGlslComments: {
|
|
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 GLSL language. This option requires the `prettier-plugin-glsl` plugin.";
|
|
30
|
+
};
|
|
31
|
+
readonly embeddedGlslTags: {
|
|
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 GLSL language. This option requires the `prettier-plugin-glsl` plugin.";
|
|
21
39
|
};
|
|
22
40
|
};
|
|
23
41
|
type Options = typeof options;
|
|
24
42
|
declare module "../types.js" {
|
|
25
43
|
interface EmbeddedOptions extends Options {
|
|
26
44
|
}
|
|
27
|
-
interface
|
|
45
|
+
interface EmbeddedDefaultCommentsHolder extends DefaultCommentsHolder {
|
|
46
|
+
}
|
|
47
|
+
interface EmbeddedDefaultTagsHolder extends DefaultTagsHolder {
|
|
28
48
|
}
|
|
29
49
|
interface PluginEmbedOptions {
|
|
30
|
-
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Please use `embeddedGlslComments` or `embeddedGlslTags`.
|
|
52
|
+
*/
|
|
53
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
54
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
55
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
31
56
|
}
|
|
32
57
|
}
|
|
33
58
|
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 ["graphql", "gql"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["graphql", "gql"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
10
8
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedGraphqlIdentifiers";
|
|
9
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedGraphqlComments";
|
|
10
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedGraphqlTags";
|
|
11
11
|
export declare const options: {
|
|
12
12
|
readonly embeddedGraphqlIdentifiers: {
|
|
13
13
|
readonly category: "Embed";
|
|
@@ -17,16 +17,42 @@ export declare const options: {
|
|
|
17
17
|
readonly value: ["graphql", "gql"];
|
|
18
18
|
}];
|
|
19
19
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded GraphQL language.";
|
|
20
|
+
readonly deprecated: "Please use `embeddedGraphqlComments` or `embeddedGraphqlTags`.";
|
|
21
|
+
};
|
|
22
|
+
readonly embeddedGraphqlComments: {
|
|
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 GraphQL language.";
|
|
30
|
+
};
|
|
31
|
+
readonly embeddedGraphqlTags: {
|
|
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 GraphQL 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 `embeddedGraphqlComments` or `embeddedGraphqlTags`.
|
|
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,16 +1,15 @@
|
|
|
1
1
|
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare const DEFAULT_IDENTIFIERS: readonly ["html", "xhtml"];
|
|
9
|
-
type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
|
|
10
|
-
type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
|
|
2
|
+
declare const DEFAULT_COMMENTS: readonly ["html", "xhtml"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["html", "xhtml"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
11
8
|
declare const HTML_PARSERS: readonly ["html", "vue", "angular", "lwc"];
|
|
12
9
|
type HtmlParser = (typeof HTML_PARSERS)[number];
|
|
13
10
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedHtmlIdentifiers";
|
|
11
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedHtmlComments";
|
|
12
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedHtmlTags";
|
|
14
13
|
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedHtmlParser";
|
|
15
14
|
export declare const options: {
|
|
16
15
|
readonly embeddedHtmlIdentifiers: {
|
|
@@ -21,6 +20,25 @@ export declare const options: {
|
|
|
21
20
|
readonly value: ["html", "xhtml"];
|
|
22
21
|
}];
|
|
23
22
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded HTML language.";
|
|
23
|
+
readonly deprecated: "Please use `embeddedHtmlComments` or `embeddedHtmlTags`.";
|
|
24
|
+
};
|
|
25
|
+
readonly embeddedHtmlComments: {
|
|
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 HTML language.";
|
|
33
|
+
};
|
|
34
|
+
readonly embeddedHtmlTags: {
|
|
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 HTML language.";
|
|
24
42
|
};
|
|
25
43
|
readonly embeddedHtmlParser: {
|
|
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 `embeddedHtmlComments` or `embeddedHtmlTags`.
|
|
65
|
+
*/
|
|
66
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
67
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
68
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
44
69
|
[EMBEDDED_LANGUAGE_PARSER]?: HtmlParser;
|
|
45
70
|
}
|
|
46
71
|
}
|
package/dist/embedded/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export * from "./register.js";
|
|
2
|
-
export type {
|
|
3
|
-
export { makeIdentifiersOptionName, type AutocompleteStringList, } from "./utils.js";
|
|
2
|
+
export type { EmbeddedDefaultComment, EmbeddedDefaultTag, EmbeddedEmbedders, EmbeddedLanguage, EmbeddedOptions, EmbeddedParsers, EmbeddedComment, EmbeddedTag, PluginEmbedOptions, } from "./types.js";
|
|
3
|
+
export { makeIdentifiersOptionName, makeCommentsOptionName, makeTagsOptionName, type AutocompleteStringList, } from "./utils.js";
|
|
@@ -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 ["ini", "cfg", "pro"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["ini", "cfg", "pro"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
10
8
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedIniIdentifiers";
|
|
9
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedIniComments";
|
|
10
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedIniTags";
|
|
11
11
|
export declare const options: {
|
|
12
12
|
readonly embeddedIniIdentifiers: {
|
|
13
13
|
readonly category: "Embed";
|
|
@@ -17,16 +17,42 @@ export declare const options: {
|
|
|
17
17
|
readonly value: ["ini", "cfg", "pro"];
|
|
18
18
|
}];
|
|
19
19
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin.";
|
|
20
|
+
readonly deprecated: "Please use `embeddedIniComments` or `embeddedIniTags`.";
|
|
21
|
+
};
|
|
22
|
+
readonly embeddedIniComments: {
|
|
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 INI language. This option requires the `prettier-plugin-ini` plugin.";
|
|
30
|
+
};
|
|
31
|
+
readonly embeddedIniTags: {
|
|
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 INI language. This option requires the `prettier-plugin-ini` 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 `embeddedIniComments` or `embeddedIniTags`.
|
|
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,8 +1,13 @@
|
|
|
1
1
|
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
|
|
2
|
-
declare const
|
|
3
|
-
type
|
|
4
|
-
type
|
|
2
|
+
declare const DEFAULT_COMMENTS: readonly ["java"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["java"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
5
8
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedJavaIdentifiers";
|
|
9
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedJavaComments";
|
|
10
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedJavaTags";
|
|
6
11
|
export declare const options: {
|
|
7
12
|
readonly embeddedJavaIdentifiers: {
|
|
8
13
|
readonly category: "Embed";
|
|
@@ -12,16 +17,42 @@ export declare const options: {
|
|
|
12
17
|
readonly value: ["java"];
|
|
13
18
|
}];
|
|
14
19
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin.";
|
|
20
|
+
readonly deprecated: "Please use `embeddedJavaComments` or `embeddedJavaTags`.";
|
|
21
|
+
};
|
|
22
|
+
readonly embeddedJavaComments: {
|
|
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 Java language. This option requires the `prettier-plugin-java` plugin.";
|
|
30
|
+
};
|
|
31
|
+
readonly embeddedJavaTags: {
|
|
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 Java language. This option requires the `prettier-plugin-java` plugin.";
|
|
15
39
|
};
|
|
16
40
|
};
|
|
17
41
|
type Options = typeof options;
|
|
18
42
|
declare module "../types.js" {
|
|
19
43
|
interface EmbeddedOptions extends Options {
|
|
20
44
|
}
|
|
21
|
-
interface
|
|
45
|
+
interface EmbeddedDefaultCommentsHolder extends DefaultCommentsHolder {
|
|
46
|
+
}
|
|
47
|
+
interface EmbeddedDefaultTagsHolder extends DefaultTagsHolder {
|
|
22
48
|
}
|
|
23
49
|
interface PluginEmbedOptions {
|
|
24
|
-
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Please use `embeddedJavaComments` or `embeddedJavaTags`.
|
|
52
|
+
*/
|
|
53
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
54
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
55
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
25
56
|
}
|
|
26
57
|
}
|
|
27
58
|
export {};
|
|
@@ -1,16 +1,16 @@
|
|
|
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 ["json", "jsonl"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["json", "jsonl"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
10
8
|
declare const JSON_PARSERS: readonly ["json", "json5", "jsonc", "json-stringify"];
|
|
11
9
|
type JsonParser = (typeof JSON_PARSERS)[number];
|
|
12
|
-
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedJsonParser";
|
|
13
10
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedJsonIdentifiers";
|
|
11
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedJsonComments";
|
|
12
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedJsonTags";
|
|
13
|
+
declare const EMBEDDED_LANGUAGE_PARSER: "embeddedJsonParser";
|
|
14
14
|
export declare const options: {
|
|
15
15
|
readonly embeddedJsonIdentifiers: {
|
|
16
16
|
readonly category: "Embed";
|
|
@@ -20,6 +20,25 @@ export declare const options: {
|
|
|
20
20
|
readonly value: ["json", "jsonl"];
|
|
21
21
|
}];
|
|
22
22
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSON language.";
|
|
23
|
+
readonly deprecated: "Please use `embeddedJsonComments` or `embeddedJsonTags`.";
|
|
24
|
+
};
|
|
25
|
+
readonly embeddedJsonComments: {
|
|
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 JSON language.";
|
|
33
|
+
};
|
|
34
|
+
readonly embeddedJsonTags: {
|
|
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 JSON language.";
|
|
23
42
|
};
|
|
24
43
|
readonly embeddedJsonParser: {
|
|
25
44
|
category: string;
|
|
@@ -36,10 +55,17 @@ type Options = typeof options;
|
|
|
36
55
|
declare module "../types.js" {
|
|
37
56
|
interface EmbeddedOptions extends Options {
|
|
38
57
|
}
|
|
39
|
-
interface
|
|
58
|
+
interface EmbeddedDefaultCommentsHolder extends DefaultCommentsHolder {
|
|
59
|
+
}
|
|
60
|
+
interface EmbeddedDefaultTagsHolder extends DefaultTagsHolder {
|
|
40
61
|
}
|
|
41
62
|
interface PluginEmbedOptions {
|
|
42
|
-
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated Please use `embeddedJsonComments` or `embeddedJsonTags`.
|
|
65
|
+
*/
|
|
66
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
67
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
68
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
43
69
|
[EMBEDDED_LANGUAGE_PARSER]?: JsonParser;
|
|
44
70
|
}
|
|
45
71
|
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
|
|
2
|
-
declare const
|
|
3
|
-
type
|
|
4
|
-
type
|
|
2
|
+
declare const DEFAULT_COMMENTS: readonly ["jsonata"];
|
|
3
|
+
type Comments = AutocompleteStringList<(typeof DEFAULT_COMMENTS)[number]>;
|
|
4
|
+
type DefaultCommentsHolder = StringListToInterfaceKey<typeof DEFAULT_COMMENTS>;
|
|
5
|
+
declare const DEFAULT_TAGS: readonly ["jsonata"];
|
|
6
|
+
type Tags = AutocompleteStringList<(typeof DEFAULT_TAGS)[number]>;
|
|
7
|
+
type DefaultTagsHolder = StringListToInterfaceKey<typeof DEFAULT_TAGS>;
|
|
5
8
|
declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedJsonataIdentifiers";
|
|
9
|
+
declare const EMBEDDED_LANGUAGE_COMMENTS: "embeddedJsonataComments";
|
|
10
|
+
declare const EMBEDDED_LANGUAGE_TAGS: "embeddedJsonataTags";
|
|
6
11
|
export declare const options: {
|
|
7
12
|
readonly embeddedJsonataIdentifiers: {
|
|
8
13
|
readonly category: "Embed";
|
|
@@ -12,16 +17,42 @@ export declare const options: {
|
|
|
12
17
|
readonly value: ["jsonata"];
|
|
13
18
|
}];
|
|
14
19
|
readonly description: "Tag or comment identifiers that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin.";
|
|
20
|
+
readonly deprecated: "Please use `embeddedJsonataComments` or `embeddedJsonataTags`.";
|
|
21
|
+
};
|
|
22
|
+
readonly embeddedJsonataComments: {
|
|
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 JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin.";
|
|
30
|
+
};
|
|
31
|
+
readonly embeddedJsonataTags: {
|
|
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 JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin.";
|
|
15
39
|
};
|
|
16
40
|
};
|
|
17
41
|
type Options = typeof options;
|
|
18
42
|
declare module "../types.js" {
|
|
19
43
|
interface EmbeddedOptions extends Options {
|
|
20
44
|
}
|
|
21
|
-
interface
|
|
45
|
+
interface EmbeddedDefaultCommentsHolder extends DefaultCommentsHolder {
|
|
46
|
+
}
|
|
47
|
+
interface EmbeddedDefaultTagsHolder extends DefaultTagsHolder {
|
|
22
48
|
}
|
|
23
49
|
interface PluginEmbedOptions {
|
|
24
|
-
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated Please use `embeddedJsonataComments` or `embeddedJsonataTags`.
|
|
52
|
+
*/
|
|
53
|
+
[EMBEDDED_LANGUAGE_IDENTIFIERS]?: (Comments[number] | Tags[number])[];
|
|
54
|
+
[EMBEDDED_LANGUAGE_COMMENTS]?: Comments;
|
|
55
|
+
[EMBEDDED_LANGUAGE_TAGS]?: Tags;
|
|
25
56
|
}
|
|
26
57
|
}
|
|
27
58
|
export {};
|