forked from prettydiff/prettydiff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptionDef.ts
888 lines (888 loc) · 37.7 KB
/
optionDef.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
(function options_init(): void {
"use strict";
const optionDef:optionDef = {
attribute_sort : {
api : "any",
default : false,
definition: "Alphanumerically sort markup attributes. Attribute sorting is ignored on tags that contain attributes template attributes.",
label : "Sort Attributes",
lexer : "markup",
mode : "any",
type : "boolean"
},
attribute_sort_list: {
api:"any",
default: "",
definition: "A comma separated list of attribute names. Attributes will be sorted according to this list and then alphanumerically. This option requires 'attribute_sort' have a value of true.",
label: "Sort Attribute List",
lexer: "markup",
mode : "any",
type: "string"
},
brace_line : {
api : "any",
default : false,
definition: "If true an empty line will be inserted after opening curly braces and before clo" +
"sing curly braces.",
label : "Brace Lines",
lexer : "script",
mode : "beautify",
type : "boolean"
},
brace_padding : {
api : "any",
default : false,
definition: "Inserts a space after the start of a container and before the end of the contain" +
"er if the contents of that container are not indented; such as: conditions, func" +
"tion arguments, and escaped sequences of template strings.",
label : "Brace Padding",
lexer : "script",
mode : "beautify",
type : "boolean"
},
brace_style : {
api : "any",
default : "none",
definition: "Emulates JSBeautify's brace_style option using existing Pretty Diff options.",
label : "Brace Style",
lexer : "script",
mode : "beautify",
type : "string",
values : {
"collapse" : "Sets options.format_object to 'indent' and options.neverflatten to true.",
"collapse-preserve-inline": "Sets options.bracepadding to true and options.format_object to 'inline'.",
"expand" : "Sets options.braces to true, options.format_object to 'indent', and options.never" +
"flatten to true.",
"none" : "Ignores this option"
}
},
braces : {
api : "any",
default : false,
definition: "Determines if opening curly braces will exist on the same line as their conditio" +
"n or be forced onto a new line. (Allman style indentation).",
label : "Style of Indent",
lexer : "script",
mode : "beautify",
type : "boolean"
},
case_space : {
api : "any",
default : false,
definition: "If the colon separating a case's expression (of a switch/case block) from its statement should be followed by a space instead of indentation, thereby keeping the case on a single line of code.",
label : "Space Following Case",
lexer : "script",
mode : "beautify",
type : "boolean"
},
color : {
api : "any",
default : "white",
definition: "The color scheme of the reports.",
label : "Color",
lexer : "any",
mode : "any",
type : "string",
values : {
"canvas": "A light brown color scheme",
"shadow": "A black and ashen color scheme",
"white" : "A white and pale grey color scheme"
}
},
comment_line : {
api : "any",
default : false,
definition: "If a blank new line should be forced above comments.",
label : "Force an Empty Line Above Comments",
lexer : "markup",
mode : "beautify",
type : "boolean"
},
comments : {
api : "any",
default : false,
definition: "This will determine whether comments should always start at position 0 of each l" +
"ine or if comments should be indented according to the code.",
label : "Indent Comments",
lexer : "any",
mode : "beautify",
type : "boolean"
},
complete_document: {
api : "any",
default : false,
definition: "Allows a preference for generating a complete HTML document instead of only gene" +
"rating content.",
label : "Generate A Complete HTML File",
lexer : "markup",
mode : "any",
type : "boolean"
},
compressed_css : {
api : "any",
default : false,
definition: "If CSS should be beautified in a style where the properties and values are minif" +
"ed for faster reading of selectors.",
label : "Compressed CSS",
lexer : "style",
mode : "beautify",
type : "boolean"
},
conditional : {
api : "any",
default : false,
definition: "If true then conditional comments used by Internet Explorer are preserved at min" +
"ification of markup.",
label : "IE Comments (HTML Only)",
lexer : "markup",
mode : "minify",
type : "boolean"
},
config : {
api : "node",
default : "",
definition: "By default Pretty Diff will look into the directory structure contain the value of option 'source' for a file named `.prettydiffrc` for saved option settings. This option allows a user to specify any file at any location in the local file system for configuration settings. A value of 'none' tells the application to bypass reading any configuration file.",
label : "Custom Config File Location",
lexer : "any",
mode : "any",
type : "string"
},
content : {
api : "any",
default : false,
definition: "This will normalize all string content to 'text' so as to eliminate some differe" +
"nces from the output.",
label : "Ignore Content",
lexer : "any",
mode : "diff",
type : "boolean"
},
correct : {
api : "any",
default : false,
definition: "Automatically correct some sloppiness in code.",
label : "Fix Sloppy Code",
lexer : "any",
mode : "any",
type : "boolean"
},
crlf : {
api : "any",
default : false,
definition: "If line termination should be Windows (CRLF) format. Unix (LF) format is the de" +
"fault.",
label : "Line Termination",
lexer : "any",
mode : "any",
type : "boolean"
},
css_insert_lines : {
api : "any",
default : false,
definition: "Inserts new line characters between every CSS code block.",
label : "Insert Empty Lines",
lexer : "style",
mode : "beautify",
type : "boolean"
},
diff : {
api : "any",
default : "",
definition: "The code sample to be compared to 'source' option. This is required if mode is " +
"'" + "diff'.",
label : "Code to Compare",
lexer : "any",
mode : "diff",
type : "string"
},
diff_comments : {
api : "any",
default : false,
definition: "If true then comments will be preserved so that both code and comments are compa" +
"red by the diff engine.",
label : "Code Comments",
lexer : "any",
mode : "diff",
type : "boolean"
},
diff_context : {
api : "any",
default : -1,
definition: "This shortens the diff output by allowing a specified number of equivalent lines" +
" between each line of difference. This option is only used with diff_format:htm" +
"l.",
label : "Context Size",
lexer : "any",
mode : "diff",
type : "number"
},
diff_format : {
api : "any",
default : "text",
definition: "The format of the output. The command line output format is text, similar to Un" +
"ix 'diff'.",
label : "Diff Format",
lexer : "any",
mode : "diff",
type : "string",
values : {
"html": "An HTML format for embedding in web pages, or as a complete web page if document" +
"_complete is true.",
"json": "A JSON format.",
"text": "Formatted similar to the Unix 'diff' command line utility."
}
},
diff_label : {
api : "any",
default : "New Sample",
definition: "This allows for a descriptive label for the diff file code of the diff HTML outp" +
"ut.",
label : "Label for Diff Sample",
lexer : "any",
mode : "diff",
type : "string"
},
diff_rendered_html: {
api: "any",
default: false,
definition: "Compares complete HTML documents and injects custom CSS so that the differences display not in the code, but in the rendered page in a browser. This option is currently confined only to markup languages, read_method file, and mode diff. Option diff_format is ignored.",
label: "Compare Rendered HTML",
lexer: "markup",
mode: "diff",
type: "boolean"
},
diff_space_ignore: {
api : "any",
default : false,
definition: "If white space only differences should be ignored by the diff tool.",
label : "Remove White Space",
lexer : "any",
mode : "diff",
type : "boolean"
},
diff_view : {
api : "any",
default : "sidebyside",
definition: "This determines whether the diff HTML output should display as a side-by-side co" +
"mparison or if the differences should display in a single table column.",
label : "Diff View Type",
lexer : "any",
mode : "diff",
type : "string",
values : {
"inline" : "A single column where insertions and deletions are vertically adjacent.",
"sidebyside": "Two column comparison of changes."
}
},
else_line : {
api : "any",
default : false,
definition: "If else_line is true then the keyword 'else' is forced onto a new line.",
label : "Else On New Line",
lexer : "script",
mode : "beautify",
type : "boolean"
},
end_comma : {
api : "any",
default : "never",
definition: "If there should be a trailing comma in arrays and objects. Value \"multiline\" o" +
"nly applies to modes beautify and diff.",
label : "Trailing Comma",
lexer : "script",
mode : "beautify",
type : "string",
values : {
"always" : "Always ensure there is a tailing comma",
"never" : "Remove trailing commas",
"none" : "Ignore this option"
}
},
end_quietly : {
api : "node",
default : "default",
definition: "A node only option to determine if terminal summary data should be logged to the" +
" console.",
label : "Log Summary to Console",
lexer : "any",
mode : "any",
type : "string",
values : {
"default": "Default minimal summary",
"log" : "Verbose logging",
"quiet" : "No extraneous logging"
}
},
force_attribute : {
api : "any",
default : false,
definition: "If all markup attributes should be indented each onto their own line.",
label : "Force Indentation of All Attributes",
lexer : "markup",
mode : "beautify",
type : "boolean"
},
force_indent : {
api : "any",
default : false,
definition: "Will force indentation upon all content and tags without regard for the creation" +
" of new text nodes.",
label : "Force Indentation of All Content",
lexer : "markup",
mode : "beautify",
type : "boolean"
},
format_array : {
api : "any",
default : "default",
definition: "Determines if all array indexes should be indented, never indented, or left to t" +
"he default.",
label : "Formatting Arrays",
lexer : "script",
mode : "beautify",
type : "string",
values : {
"default": "Default formatting",
"indent" : "Always indent each index of an array",
"inline" : "Ensure all array indexes appear on a single line"
}
},
format_object : {
api : "any",
default : "default",
definition: "Determines if all object keys should be indented, never indented, or left to the" +
" default.",
label : "Formatting Objects",
lexer : "script",
mode : "beautify",
type : "string",
values : {
"default": "Default formatting",
"indent" : "Always indent each key/value pair",
"inline" : "Ensure all key/value pairs appear on the same single line"
}
},
function_name : {
api : "any",
default : false,
definition: "If a space should follow a JavaScript function name.",
label : "Space After Function Name",
lexer : "script",
mode : "beautify",
type : "boolean"
},
help : {
api : "node",
default : 80,
definition: "A node only option to print documentation to the console. The value determines w" +
"here to wrap text.",
label : "Help Wrapping Limit",
lexer : "any",
mode : "any",
type : "number"
},
indent_char : {
api : "any",
default : " ",
definition: "The string characters to comprise a single indentation. Any string combination i" +
"s accepted.",
label : "Indentation Characters",
lexer : "any",
mode : "beautify",
type : "string"
},
indent_level : {
api : "any",
default : 0,
definition: "How much indentation padding should be applied to beautification? This option is" +
" internally used for code that requires switching between libraries.",
label : "Indentation Padding",
lexer : "any",
mode : "beautify",
type : "number"
},
indent_size : {
api : "any",
default : 4,
definition: "The number of 'indent_char' values to comprise a single indentation.",
label : "Indent Size",
lexer : "any",
mode : "beautify",
type : "number"
},
jsscope : {
api : "any",
default : "none",
definition: "An educational tool to generate HTML output of JavaScript code to identify scope" +
" regions and declared references by color. This option is ignored unless the code language is JavaScript or TypeScript.",
label : "JavaScript Scope Identification",
lexer : "script",
mode : "beautify",
type : "string",
values : {
html : "generates HTML output with escaped angle braces and ampersands for embedding as " +
"code, which is handy in code producing tools",
none : "prevents use of this option",
report: "generates HTML output that renders in web browsers"
}
},
language : {
api : "any",
default : "auto",
definition: "The lowercase single word common name of the source code's programming language. The value 'auto' imposes language and lexer auto-detection, which ignores deliberately specified lexer values. The value 'text' is converted to 'auto' if options 'mode' is not 'diff'. Value 'text' allows literal comparisons.",
label : "Language",
lexer : "any",
mode : "any",
type : "string"
},
language_default : {
api : "any",
default : "text",
definition: "The fallback option if option 'lang' is set to 'auto' and a language cannot be d" +
"etected.",
label : "Language Auto-Detection Default",
lexer : "any",
mode : "any",
type : "string"
},
language_name : {
api : "any",
default : "JavaScript",
definition: "The formatted proper name of the code sample's language for use in reports read " +
"by people.",
label : "Formatted Name of the Code's Language",
lexer : "any",
mode : "any",
type : "string"
},
lexer : {
api : "any",
default : "auto",
definition: "This option determines which sets of rules to use in the language parser. If opt" +
"ion 'language' has a value of 'auto', which is the default value, this option is" +
" ignored. The value 'text' is converted to 'auto' if options 'mode' is not 'diff'. Value 'text' allows literal comparisons.",
label : "Parsing Lexer",
lexer : "any",
mode : "any",
type : "string",
values : {
auto : "The value 'auto' imposes language and lexer auto-detection, which ignores deliberately specified language values.",
markup: "parses languages like XML and HTML",
script: "parses languages with a C style syntax, such as JavaScript",
style : "parses CSS like languages"
}
},
list_options : {
api : "node",
default : false,
definition: "A Node.js only option that writes current option settings to the console.",
label : "Options List",
lexer : "any",
mode : "any",
type : "boolean"
},
method_chain : {
api : "any",
default : 3,
definition: "When to break consecutively chained methods and properties onto separate lines. " +
"A negative value disables this option. A value of 0 ensures method chains are ne" +
"ver broken.",
label : "Method Chains",
lexer : "script",
mode : "beautify",
type : "number"
},
minify_keep_comments : {
api : "any",
default : false,
definition: "Prevents minification from stripping out comments.",
label : "Keep Comments",
lexer : "any",
mode : "minify",
type : "boolean"
},
minify_wrap : {
api : "any",
default : false,
definition: "Whether minified script should wrap after a specified character width. This opt" +
"ion requires a value from option 'wrap'.",
label : "Minification Wrapping",
lexer : "script",
mode : "minify",
type : "boolean"
},
mode : {
api : "any",
default : "diff",
definition: "The operation to be performed.",
label : "Mode",
lexer : "any",
mode : "any",
type : "string",
values : {
beautify: "beautifies code and returns a string",
diff : "returns either command line list of differences or an HTML report",
minify : "minifies code and returns a string",
parse : "using option 'parseFormat' returns an object with shallow arrays, a multidimensi" +
"onal array, or an HTML report"
}
},
never_flatten : {
api : "any",
default : false,
definition: "If destructured lists in script should never be flattend.",
label : "Never Flatten Destructured Lists",
lexer : "script",
mode : "beautify",
type : "boolean"
},
new_line : {
api : "any",
default : false,
definition: "Insert an empty line at the end of output.",
label : "New Line at End of Code",
lexer : "any",
mode : "any",
type : "boolean"
},
no_case_indent : {
api : "any",
default : false,
definition: "If a case statement should receive the same indentation as the containing switch" +
" block.",
label : "Case Indentation",
lexer : "script",
mode : "beautify",
type : "boolean"
},
no_lead_zero : {
api : "any",
default : false,
definition: "Whether leading 0s in CSS values immediately preceding a decimal should be remo" +
"ved or prevented.",
label : "Leading 0s",
lexer : "style",
mode : "any",
type : "boolean"
},
no_semicolon : {
api : "any",
default : false,
definition: "Removes semicolons that would be inserted by ASI. This option is in conflict with option 'correct' and takes precedence over conflicting features. Use of this option is a possible security/stability risk.",
label : "No Semicolons",
lexer : "script",
mode : "beautify",
type : "boolean"
},
node_error : {
api : "node",
default : false,
definition: "A Node.js only option if parse errors should be written to the console.",
label : "Write Parse Errors in Node",
lexer : "any",
mode : "any",
type : "boolean"
},
object_sort : {
api : "any",
default : false,
definition: "Sorts markup attributes and properties by key name in script and style.",
label : "Object/Attribute Sort",
lexer : "any",
mode : "beautify",
type : "boolean"
},
output : {
api : "node",
default : "",
definition: "A file path for which to write output. If this option is not specified output will be printed to the shell.",
label : "Output Location",
lexer : "any",
mode : "any",
type : "string"
},
parse_format : {
api : "any",
default : "parallel",
definition: "Determines the output format for 'parse' mode.",
label : "Parse Format",
lexer : "any",
mode : "parse",
type : "string",
values : {
htmltable : "generates the 'table' type output for the DOM but escapes the HTML tags for rend" +
"ering as HTML code in a HTML tool",
parallel : "returns an object containing series of parallel arrays",
sequential: "returns an array where each index is a child object containing the parsed token" +
" and all descriptive data",
table : "generates a colorful grid of output for either the dom or command line interface"
}
},
parse_space : {
api : "any",
default : false,
definition: "Whether whitespace tokens should be included in markup parse output.",
label : "Retain White Space Tokens in Parse Output",
lexer : "markup",
mode : "parse",
type : "boolean"
},
preserve : {
api : "any",
default : 0,
definition: "The maximum number of consecutive empty lines to retain.",
label : "Preserve Consecutive New Lines",
lexer : "any",
mode : "beautify",
type : "number"
},
preserve_comment : {
api : "any",
default : false,
definition: "Prevent comment reformatting due to option wrap.",
label : "Eliminate Word Wrap Upon Comments",
lexer : "any",
mode : "beautify",
type : "boolean"
},
preserve_text : {
api : "any",
default : false,
definition: "If text in the provided markup code should be preserved exactly as provided. Thi" +
"s option eliminates beautification and wrapping of text content.",
label : "Preserve Markup Text White Space",
lexer : "markup",
mode : "any",
type : "boolean"
},
quote : {
api : "any",
default : false,
definition: "If true and mode is 'diff' then all single quote characters will be replaced by " +
"double quote characters in both the source and diff file input so as to eliminat" +
"e some differences from the diff report HTML output.",
label : "Normalize Quotes",
lexer : "any",
mode : "diff",
type : "boolean"
},
quote_convert : {
api : "any",
default : "none",
definition: "If the quotes of script strings or markup attributes should be converted to sing" +
"le quotes or double quotes.",
label : "Indent Size",
lexer : "any",
mode : "any",
type : "string",
values : {
"double": "Converts single quotes to double quotes",
"none" : "Ignores this option",
"single": "Converts double quotes to single quotes"
}
},
read_method : {
api : "node",
default : "auto",
definition: "The option determines how Node.js should receive input. All output will be prin" +
"ted to the shell unless the option 'output' is specified, which will write outpu" +
"t to a file.",
label : "Read Method",
lexer : "any",
mode : "any",
type : "string",
values : {
auto : "changes to value subdirectory, file, or screen depending on source resolution",
directory : "process all files in the specified directory only",
file : "reads a file and outputs to a file. file requires option 'output'",
screen : "reads from screen and outputs to screen",
subdirectory: "process all files in a directory and its subdirectories"
}
},
selector_list : {
api : "any",
default : false,
definition: "If comma separated CSS selectors should present on a single line of code.",
label : "Indent Size",
lexer : "style",
mode : "beautify",
type : "boolean"
},
semicolon : {
api : "any",
default : false,
definition: "If true and mode is 'diff' and lang is 'javascript' all semicolon characters tha" +
"t immediately precede any white space containing a new line character will be re" +
"moved so as to eliminate some differences from the code comparison.",
label : "Indent Size",
lexer : "script",
mode : "diff",
type : "boolean"
},
source : {
api : "any",
default : "",
definition: "The source code or location for interpretation. This option is required for all " +
"modes.",
label : "Source Sample",
lexer : "any",
mode : "any",
type : "string"
},
source_label : {
api : "any",
default : "Source Sample",
definition: "This allows for a descriptive label of the source file code for the diff HTML o" +
"utput.",
label : "Label for Source Sample",
lexer : "any",
mode : "diff",
type : "string"
},
space : {
api : "any",
default : true,
definition: "Inserts a space following the function keyword for anonymous functions.",
label : "Function Space",
lexer : "script",
mode : "beautify",
type : "boolean"
},
space_close : {
api : "any",
default : false,
definition: "Markup self-closing tags end will end with ' />' instead of '/>'.",
label : "Close Markup Self-Closing Tags with a Space",
lexer : "markup",
mode : "beautify",
type : "boolean"
},
styleguide : {
api : "any",
default : "none",
definition: "Provides a collection of option presets to easily conform to popular JavaScript " +
"style guides.",
label : "Script Styleguide",
lexer : "script",
mode : "beautify",
type : "string",
values : {
"airbnb" : "https://github.com/airbnb/javascript",
"crockford": "http://jslint.com/",
"google" : "https://google.github.io/styleguide/jsguide.html",
"jquery" : "https://contribute.jquery.org/style-guide/js/",
"jslint" : "http://jslint.com/",
"mediawiki": "https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript",
"mrdoob" : "https://github.com/mrdoob/three.js/wiki/Mr.doob's-Code-Style%E2%84%A2",
"none" : "Ignores this option",
"semistandard": "https://github.com/Flet/semistandard",
"standard" : "https://standardjs.com/",
"yandex" : "https://github.com/ymaps/codestyle/blob/master/javascript.md"
}
},
summary_only : {
api : "node",
default : false,
definition: "Node only option to output only number of differences.",
label : "Output Diff Only Without A Summary",
lexer : "any",
mode : "diff",
type : "boolean"
},
tag_merge : {
api : "any",
default : false,
definition: "Allows immediately adjacement start and end markup tags of the same name to be c" +
"ombined into a single self-closing tag.",
label : "Merge Adjacent Start and End tags",
lexer : "markup",
mode : "any",
type : "boolean"
},
tag_sort : {
api : "any",
default : false,
definition: "Sort child items of each respective markup parent element.",
label : "Sort Markup Child Items",
lexer : "markup",
mode : "any",
type : "boolean"
},
ternary_line : {
api : "any",
default : false,
definition: "If ternary operators in JavaScript ? and : should remain on the same line.",
label : "Keep Ternary Statements On One Line",
lexer : "script",
mode : "beautify",
type : "boolean"
},
top_comments : {
api : "any",
default : false,
definition: "If mode is 'minify' this determines whether comments above the first line of cod" +
"e should be kept.",
label : "Retain Comment At Code Start",
lexer : "any",
mode : "minify",
type : "boolean"
},
unformatted : {
api : "any",
default : false,
definition: "If markup tags should have their insides preserved. This option is only available to markup and does not support child tokens that require a different lexer.",
label : "Markup Tag Preservation",
lexer : "markup",
mode : "any",
type : "boolean"
},
variable_list : {
api : "any",
default : "none",
definition: "If consecutive JavaScript variables should be merged into a comma separated list" +
" or if variables in a list should be separated.",
label : "Variable Declaration Lists",
lexer : "script",
mode : "any",
type : "string",
values : {
"each": "Ensurce each reference is a single declaration statement.",
"list": "Ensure consecutive declarations are a comma separated list.",
"none": "Ignores this option."
}
},
version : {
api : "node",
default : false,
definition: "A Node.js only option to write the version information to the console.",
label : "Version",
lexer : "any",
mode : "any",
type : "boolean"
},
vertical : {
api : "any",
default : false,
definition: "If lists of assignments and properties should be vertically aligned. This option" +
" is not used with the markup lexer.",
label : "Vertical Alignment",
lexer : "any",
mode : "beautify",
type : "boolean"
},
wrap : {
api : "any",
default : 0,
definition: "Character width limit before applying word wrap. A 0 value disables this option." +
" A negative value concatenates script strings.",
label : "Wrap",
lexer : "any",
mode : "any",
type : "number"
}
};
global
.prettydiff
.api
.optionDef = optionDef;
}());