@platformos/prettier-plugin-liquid 0.0.5 → 0.0.7
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/dist/plugin.js +0 -6
- package/dist/printer/embed.js +2 -3
- package/dist/printer/preprocess/augment-with-css-properties.js +0 -6
- package/dist/printer/preprocess/augment-with-siblings.d.ts +52 -88
- package/dist/printer/print/children.d.ts +1 -1
- package/dist/printer/print/liquid.d.ts +1 -1
- package/dist/printer/print/tag.d.ts +1 -1
- package/dist/printer/printer-liquid-html.js +1 -48
- package/package.json +6 -5
- package/standalone.d.ts +2 -0
- package/standalone.js +1243 -1248
package/dist/plugin.js
CHANGED
|
@@ -28,42 +28,36 @@ const options = {
|
|
|
28
28
|
],
|
|
29
29
|
category: 'LIQUID',
|
|
30
30
|
default: 'strict',
|
|
31
|
-
since: '1.5.0',
|
|
32
31
|
},
|
|
33
32
|
liquidSingleQuote: {
|
|
34
33
|
type: 'boolean',
|
|
35
34
|
category: 'LIQUID',
|
|
36
35
|
default: true,
|
|
37
36
|
description: 'Use single quotes instead of double quotes in Liquid tags and objects.',
|
|
38
|
-
since: '0.2.0',
|
|
39
37
|
},
|
|
40
38
|
embeddedSingleQuote: {
|
|
41
39
|
type: 'boolean',
|
|
42
40
|
category: 'LIQUID',
|
|
43
41
|
default: true,
|
|
44
42
|
description: 'Use single quotes instead of double quotes in embedded languages (JavaScript, CSS, TypeScript inside <script>, <style> or Liquid equivalent).',
|
|
45
|
-
since: '0.4.0',
|
|
46
43
|
},
|
|
47
44
|
singleLineLinkTags: {
|
|
48
45
|
type: 'boolean',
|
|
49
46
|
category: 'HTML',
|
|
50
47
|
default: false,
|
|
51
48
|
description: 'Always print link tags on a single line to remove clutter',
|
|
52
|
-
since: '0.1.0',
|
|
53
49
|
},
|
|
54
50
|
indentSchema: {
|
|
55
51
|
type: 'boolean',
|
|
56
52
|
category: 'LIQUID',
|
|
57
53
|
default: false,
|
|
58
54
|
description: 'Indent the contents of the {% schema %} tag',
|
|
59
|
-
since: '0.1.0',
|
|
60
55
|
},
|
|
61
56
|
liquidDocParamDash: {
|
|
62
57
|
type: 'boolean',
|
|
63
58
|
category: 'LIQUID',
|
|
64
59
|
default: true,
|
|
65
60
|
description: 'Append a dash (-) to separate descriptions in {% doc %} @param annotations',
|
|
66
|
-
since: '1.6.4',
|
|
67
61
|
},
|
|
68
62
|
};
|
|
69
63
|
const defaultOptions = {
|
package/dist/printer/embed.js
CHANGED
|
@@ -17,7 +17,7 @@ exports.ParserMap = {
|
|
|
17
17
|
// Prettier 2 and 3 have a slightly different API for embed.
|
|
18
18
|
//
|
|
19
19
|
// https://github.com/prettier/prettier/wiki/How-to-migrate-my-plugin-to-support-Prettier-v3%3F
|
|
20
|
-
|
|
20
|
+
exports.embed2 = ((path, _print, textToDoc, options) => {
|
|
21
21
|
const node = path.getValue();
|
|
22
22
|
switch (node.type) {
|
|
23
23
|
case liquid_html_parser_1.NodeTypes.RawMarkup: {
|
|
@@ -40,8 +40,7 @@ const embed2 = (path, _print, textToDoc, options) => {
|
|
|
40
40
|
default:
|
|
41
41
|
return null;
|
|
42
42
|
}
|
|
43
|
-
};
|
|
44
|
-
exports.embed2 = embed2;
|
|
43
|
+
});
|
|
45
44
|
const embed3 = (path, options) => {
|
|
46
45
|
return (textToDoc) => {
|
|
47
46
|
const node = path.node;
|
|
@@ -102,9 +102,6 @@ function getCssDisplay(node, options) {
|
|
|
102
102
|
case liquid_html_parser_1.NodeTypes.FunctionMarkup:
|
|
103
103
|
case liquid_html_parser_1.NodeTypes.GraphQLMarkup:
|
|
104
104
|
case liquid_html_parser_1.NodeTypes.GraphQLInlineMarkup:
|
|
105
|
-
case liquid_html_parser_1.NodeTypes.JsonHashLiteral:
|
|
106
|
-
case liquid_html_parser_1.NodeTypes.JsonArrayLiteral:
|
|
107
|
-
case liquid_html_parser_1.NodeTypes.JsonKeyValuePair:
|
|
108
105
|
case liquid_html_parser_1.NodeTypes.BackgroundMarkup:
|
|
109
106
|
case liquid_html_parser_1.NodeTypes.BackgroundInlineMarkup:
|
|
110
107
|
case liquid_html_parser_1.NodeTypes.CacheMarkup:
|
|
@@ -210,9 +207,6 @@ function getNodeCssStyleWhiteSpace(node, options) {
|
|
|
210
207
|
case liquid_html_parser_1.NodeTypes.FunctionMarkup:
|
|
211
208
|
case liquid_html_parser_1.NodeTypes.GraphQLMarkup:
|
|
212
209
|
case liquid_html_parser_1.NodeTypes.GraphQLInlineMarkup:
|
|
213
|
-
case liquid_html_parser_1.NodeTypes.JsonHashLiteral:
|
|
214
|
-
case liquid_html_parser_1.NodeTypes.JsonArrayLiteral:
|
|
215
|
-
case liquid_html_parser_1.NodeTypes.JsonKeyValuePair:
|
|
216
210
|
case liquid_html_parser_1.NodeTypes.BackgroundMarkup:
|
|
217
211
|
case liquid_html_parser_1.NodeTypes.BackgroundInlineMarkup:
|
|
218
212
|
case liquid_html_parser_1.NodeTypes.CacheMarkup:
|