forked from runem/lit-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
851 lines (851 loc) · 21.3 KB
/
package.json
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
{
"name": "lit-plugin",
"private": true,
"displayName": "lit-plugin",
"description": "Syntax highlighting, type checking and code completion for lit-html",
"version": "1.4.3",
"publisher": "runem",
"icon": "docs/assets/[email protected]",
"license": "MIT",
"engines": {
"vscode": "^1.63.0"
},
"categories": [
"Programming Languages"
],
"homepage": "https://github.com/runem/lit-analyzer",
"bugs": {
"url": "https://github.com/runem/lit-analyzer/issues",
"email": "[email protected]"
},
"repository": {
"type": "git",
"url": "https://github.com/runem/lit-analyzer.git"
},
"main": "bundle.js",
"scripts": {
"watch": "tsc -watch -p ./",
"package": "wireit",
"readme": "readme generate -i readme.blueprint.md -c readme.config.json",
"test": "wireit",
"build": "wireit",
"test:normal": "wireit",
"test:packaged": "wireit",
"create-isolated-extension-dir": "wireit",
"test:packaged-sequentialized": "wireit",
"bundle": "wireit",
"make-built-dir": "wireit"
},
"wireit": {
"build": {
"dependencies": [
"../lit-analyzer:build",
"make-built-dir"
],
"command": "tsc --build --pretty",
"files": [
"src/**/*",
"tsconfig.json"
],
"output": [
"out/**/*.js",
"out/**/*.d.ts",
"out/**/*.d.ts.map",
".tsbuildinfo"
],
"clean": "if-file-deleted"
},
"test": {
"dependencies": [
"test:normal",
"test:packaged-sequentialized"
]
},
"test:normal": {
"dependencies": [
"build"
],
"files": [
"package.json",
"schemas/**/*"
],
"output": [],
"command": "node ./out/test/scripts/test-runner.js ./built"
},
"test:packaged": {
"dependencies": [
"build",
"create-isolated-extension-dir"
],
"files": [],
"output": [],
"command": "node ./out/test/scripts/test-runner.js ../../../packaged-extension/extension/"
},
"test:packaged-sequentialized": {
"#comment": "like test:packaged, only it ensures that test:normal runs first",
"dependencies": [
"test:normal",
"build",
"create-isolated-extension-dir"
],
"files": [],
"output": [],
"command": "node ./out/test/scripts/test-runner.js ../../../packaged-extension/extension/"
},
"package": {
"dependencies": [
"make-built-dir"
],
"files": [],
"output": [
"out/packaged.vsix"
],
"command": "mkdir -p out && cd built && vsce package -o ../out/packaged.vsix"
},
"publish": {
"dependencies": [
"make-built-dir"
],
"command": "cd built && vsce publish"
},
"create-isolated-extension-dir": {
"dependencies": [
"package"
],
"files": [
"out/packaged.vsix"
],
"command": "rm -rf ../../../packaged-extension/ && mkdir ../../../packaged-extension/ && unzip -qq ./out/packaged.vsix -d ../../../packaged-extension/",
"clean": false
},
"bundle": {
"dependencies": [
"../lit-analyzer:build"
],
"command": "node esbuild.script.mjs",
"files": [
"src/**/*",
"../ts-lit-plugin/src/**/*",
"../ts-lit-plugin/index.js",
"esbuild.script.mjs"
],
"output": [
"built/bundle.js",
"built/node_modules/ts-lit-plugin/index.js"
]
},
"make-built-dir": {
"dependencies": [
"../ts-lit-plugin:build",
"bundle"
],
"files": [
"../ts-lit-plugin/package.json",
"package.json",
"schemas/**",
"syntaxes/**",
"docs/**",
"README.md",
"LICENSE.md",
"copy-to-built.js"
],
"output": [
"built/docs",
"built/node_modules/typescript",
"built/node_modules/ts-lit-plugin/package.json",
"built/node_modules/ts-lit-plugin/index.js",
"built/schemas",
"built/syntaxes",
"built/LICENSE.md",
"built/package.json",
"built/README.md"
],
"command": "node ./copy-to-built.js"
}
},
"dependencies": {
"typescript": "~5.2.2"
},
"devDependencies": {
"@types/mocha": "^9.1.0",
"@types/node": "^14.0.13",
"@types/vscode": "^1.30.0",
"esbuild": "^0.14.36",
"lit-analyzer": "^2.0.3",
"mocha": "^9.1.4",
"vsce": "^2.7.0",
"wireit": "^0.1.1"
},
"activationEvents": [
"onCommand:lit-plugin.analyze",
"onLanguage:javascript",
"onLanguage:javascriptreact",
"onLanguage:typescript",
"onLanguage:typescriptreact"
],
"contributors": [
{
"name": "Rune Mehlsen",
"url": "https://twitter.com/runemehlsen",
"img": "https://avatars2.githubusercontent.com/u/5372940?s=460&v=4"
},
{
"name": "Andreas Mehlsen",
"url": "https://twitter.com/andreasmehlsen",
"img": "https://avatars1.githubusercontent.com/u/6267397?s=460&v=4"
},
{
"name": "You?",
"img": "https://joeschmoe.io/api/v1/random",
"url": "https://github.com/runem/lit-analyzer/blob/master/CONTRIBUTING.md"
}
],
"contributes": {
"commands": [
{
"command": "lit-plugin.analyze",
"title": "Analyze lit-html templates"
}
],
"configuration": [
{
"id": "lit-plugin",
"title": "lit-plugin",
"properties": {
"lit-plugin.disable": {
"type": "boolean",
"description": "Completely disable this plugin.",
"default": false
},
"lit-plugin.strict": {
"type": "boolean",
"description": "Enable strict mode.",
"default": false
},
"lit-plugin.maxProjectImportDepth": {
"type": "integer",
"description": "Determines how many modules deep dependencies are followed to determine whether a custom element is available in the current file. When `-1` is used, dependencies will be followed infinitely deep.",
"default": -1
},
"lit-plugin.maxNodeModuleImportDepth": {
"type": "integer",
"description": "Determines how many modules deep dependencies in npm packages are followed to determine whether a custom element is available in the current file. When `-1` is used, dependencies will be followed infinitely deep.",
"default": 1
},
"lit-plugin.securitySystem": {
"type": "string",
"description": "The lit-html security sanitization strategy to assume.",
"default": "off",
"enum": [
"off",
"ClosureSafeTypes"
]
},
"lit-plugin.htmlTemplateTags": {
"type": "array",
"description": "List of template tags to enable html support in.",
"items": {
"type": "string",
"description": "Template tag function names."
},
"default": [
"html",
"raw"
]
},
"lit-plugin.cssTemplateTags": {
"type": "array",
"description": "List of template tags to enable css support in.",
"items": {
"type": "string",
"description": "Template tag function names."
},
"default": [
"css"
]
},
"lit-plugin.dontShowSuggestions": {
"type": "boolean",
"description": "Don't append messages suggesting how to fix diagnostics.",
"default": false
},
"lit-plugin.globalTags": {
"type": "array",
"description": "List of html tag names that you expect to be present at all times.",
"items": {
"type": "string",
"description": "Tag name."
}
},
"lit-plugin.globalAttributes": {
"type": "array",
"description": "List of html attributes names that you expect to be present at all times. These attributes are not checked at all.",
"items": {
"type": "string",
"description": "Attribute name."
}
},
"lit-plugin.globalEvents": {
"type": "array",
"description": "List of event names that you expect to be present at all times. These events are not checked at all.",
"items": {
"type": "string",
"description": "Event name."
}
},
"lit-plugin.logging": {
"type": "string",
"description": "Log to a file called 'lit-plugin.log' which will be created in the root of the project.",
"default": "off",
"enum": [
"off",
"error",
"warn",
"debug",
"verbose"
]
},
"lit-plugin.rules.no-unknown-tag-name": {
"type": "string",
"description": "Check the existence of tag names.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-missing-import": {
"type": "string",
"description": "Check that custom elements used are imported.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-missing-element-type-definition": {
"type": "string",
"description": "This rule will ensure that custom elements are registered on the HTMLElementTagNameMap Typescript interface.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-unclosed-tag": {
"type": "string",
"description": "Check that all tags are properly closed.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-unknown-attribute": {
"type": "string",
"description": "Check the existence of attribute names.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-unknown-property": {
"type": "string",
"description": "Check the existence of property names.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-unknown-event": {
"type": "string",
"description": "Check the existence of event names.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-unknown-slot": {
"type": "string",
"description": "Check the existence of slot names (requires '@slot' jsdoc on custom element declarations).",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-invalid-boolean-binding": {
"type": "string",
"description": "Disallow boolean attribute bindings on non-boolean types.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-expressionless-property-binding": {
"type": "string",
"description": "Disallow property bindings without an expression.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-noncallable-event-binding": {
"type": "string",
"description": "Disallow event listener bindings with a noncallable type.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-boolean-in-attribute-binding": {
"type": "string",
"description": "Disallow attribute bindings with a boolean type.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-complex-attribute-binding": {
"type": "string",
"description": "Disallow attribute bindings with a complex type.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-nullable-attribute-binding": {
"type": "string",
"description": "Disallow attribute bindings with nullable types such as \"null\" or \"undefined\".",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-incompatible-type-binding": {
"type": "string",
"description": "Disallow incompatible type in bindings.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-invalid-directive-binding": {
"type": "string",
"description": "Disallow using built-in directives in unsupported bindings.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-incompatible-property-type": {
"type": "string",
"description": "Check the 'type' key of the @property decorator against the actual property type.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-invalid-attribute-name": {
"type": "string",
"description": "Check the validity of the attribute names.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-invalid-tag-name": {
"type": "string",
"description": "Check the validity of the tag name when defining custom elements.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.rules.no-invalid-css": {
"type": "string",
"description": "Check CSS within the css tagged template literal.",
"default": "default",
"enum": [
"default",
"off",
"warning",
"error"
]
},
"lit-plugin.customHtmlData": {
"version": 1,
"title": "VS Code HTML Custom Data format",
"description": "Format for loading html data in VS Code's HTML custom data format",
"type": "object",
"required": [
"version"
],
"properties": {
"version": {
"const": 1,
"description": "The custom data version",
"type": "number"
},
"tags": {
"description": "Custom HTML tags",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"defaultSnippets": [
{
"body": {
"name": "$1",
"description": "",
"attributes": []
}
}
],
"properties": {
"name": {
"type": "string",
"description": "Name of tag"
},
"description": {
"type": "string",
"description": "Description of tag shown in completion and hover"
},
"attributes": {
"type": "array",
"description": "A list of possible attributes for the tag",
"items": {
"type": "object",
"required": [
"name"
],
"defaultSnippets": [
{
"body": {
"name": "$1",
"description": "",
"values": []
}
}
],
"properties": {
"name": {
"type": "string",
"description": "Name of attribute"
},
"description": {
"type": "string",
"description": "Description of attribute shown in completion and hover"
},
"valueSet": {
"type": "string",
"description": "Name of the matching attribute value set"
},
"values": {
"type": "array",
"description": "A list of possible values for the attribute",
"items": {
"type": "object",
"required": [
"name"
],
"defaultSnippets": [
{
"body": {
"name": "$1",
"description": ""
}
}
],
"properties": {
"name": {
"type": "string",
"description": "Name of attribute value"
},
"description": {
"type": "string",
"description": "Description of attribute value shown in completion and hover"
}
}
}
}
}
}
}
}
}
},
"globalAttributes": {
"description": "Custom HTML global attributes",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"defaultSnippets": [
{
"body": {
"name": "$1",
"description": "",
"values": []
}
}
],
"properties": {
"name": {
"type": "string",
"description": "Name of attribute"
},
"description": {
"type": "string",
"description": "Description of attribute shown in completion and hover"
},
"valueSet": {
"type": "string",
"description": "Name of the matching attribute value set"
},
"values": {
"type": "array",
"description": "A list of possible values for the attribute",
"items": {
"type": "object",
"required": [
"name"
],
"defaultSnippets": [
{
"body": {
"name": "$1",
"description": ""
}
}
],
"properties": {
"name": {
"type": "string",
"description": "Name of attribute value"
},
"description": {
"type": "string",
"description": "Description of attribute value shown in completion and hover"
}
}
}
}
}
}
},
"valueSets": {
"description": "A set of attribute value. When an attribute refers to an attribute set, its value completion will use valuse from that set",
"type": "array",
"items": {
"type": "object",
"required": [
"name"
],
"defaultSnippets": [
{
"body": {
"name": "$1",
"description": "",
"values": []
}
}
],
"properties": {
"name": {
"type": "string",
"description": "Name of attribute value in value set"
},
"values": {
"type": "array",
"description": "A list of possible values for the attribute",
"items": {
"type": "object",
"required": [
"name"
],
"defaultSnippets": [
{
"body": {
"name": "$1",
"description": ""
}
}
],
"properties": {
"name": {
"type": "string",
"description": "Name of attribute value"
},
"description": {
"type": "string",
"description": "Description of attribute value shown in completion and hover"
}
}
}
}
}
}
}
}
}
}
}
],
"typescriptServerPlugins": [
{
"name": "ts-lit-plugin",
"enableForWorkspaceTypeScriptVersions": true
}
],
"jsonValidation": [
{
"fileMatch": "jsconfig*.json",
"url": "./schemas/tsconfig.schema.json"
},
{
"fileMatch": "tsconfig*.json",
"url": "./schemas/tsconfig.schema.json"
}
],
"grammars": [
{
"injectTo": [
"source.js",
"source.js.jsx",
"source.jsx",
"source.ts",
"source.tsx",
"text.html.basic"
],
"scopeName": "inline.lit-html",
"path": "./syntaxes/vscode-lit-html/lit-html.json",
"embeddedLanguages": {
"meta.embedded.block.html": "html",
"meta.embedded.block.css": "css",
"source.css": "css"
}
},
{
"injectTo": [
"source.js",
"source.js.jsx",
"source.jsx",
"source.ts",
"source.tsx",
"text.html.basic"
],
"scopeName": "inline.lit-html.string.injection",
"path": "./syntaxes/vscode-lit-html/lit-html-string-injection.json",
"embeddedLanguages": {
"meta.template.expression.ts": "typescript"
}
},
{
"injectTo": [
"source.js",
"source.js.jsx",
"source.jsx",
"source.ts",
"source.tsx",
"text.html.basic"
],
"scopeName": "inline.lit-html.style.injection",
"path": "./syntaxes/vscode-lit-html/lit-html-style-injection.json",
"embeddedLanguages": {
"meta.template.expression.ts": "typescript"
}
},
{
"injectTo": [
"source.js",
"source.js.jsx",
"source.jsx",
"source.ts",
"source.tsx",
"text.html.basic"
],
"scopeName": "inline.lit-html-svg",
"path": "./syntaxes/vscode-lit-html/lit-html-svg.json",
"embeddedLanguages": {
"meta.embedded.block.svg": "xml"
}
},
{
"scopeName": "source.css.styled",
"path": "./syntaxes/vscode-styled-components/css.styled.json"
},
{
"injectTo": [
"source.js",
"source.ts",
"source.jsx",
"source.js.jsx",
"source.tsx"
],
"scopeName": "styled",
"path": "./syntaxes/vscode-styled-components/styled-components.json",
"embeddedLanguages": {
"source.css.scss": "css",
"meta.embedded.line.ts": "typescript"
}
}
]
}
}