-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpackage.json
More file actions
503 lines (503 loc) · 16.3 KB
/
Copy pathpackage.json
File metadata and controls
503 lines (503 loc) · 16.3 KB
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
{
"name": "djlint",
"displayName": "djLint",
"version": "2026.7.1",
"description": "HTML template formatter and linter (Django, Jinja, Twig, Nunjucks, Handlebars, Liquid, Go templates, Mustache, Tera, Askama)",
"categories": [
"Formatters",
"Linters"
],
"keywords": [
"djlint",
"django",
"jinja",
"twig",
"nunjucks",
"handlebars",
"liquid",
"go template",
"golang",
"hugo",
"helm",
"mustache",
"tera",
"askama"
],
"homepage": "https://github.com/djlint/djlint-vscode",
"bugs": {
"url": "https://github.com/djlint/djlint-vscode/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/djlint/djlint-vscode"
},
"license": "MIT",
"publisher": "monosans",
"type": "module",
"main": "./dist/extension.cjs",
"scripts": {
"esbuild-base": "esbuild ./src/extension.ts --bundle --outfile=dist/extension.cjs --external:vscode --format=cjs --platform=node --target=node22.21.1",
"format": "prettier --write .",
"lint": "eslint --max-warnings 0 . && tsc",
"vscode:prepublish": "node ./build/minify-package-json.mjs && npm run esbuild-base -- --minify",
"watch:esbuild": "npm run esbuild-base -- --sourcemap --watch",
"watch:tsc": "tsc --watch"
},
"contributes": {
"configuration": {
"properties": {
"djlint.blankLineAfterTag": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "Add an additional blank line after `{% <tag> ... %}` tag groups. Requires djLint ≥ 1.25."
},
"djlint.blankLineBeforeTag": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"markdownDescription": "Add an additional blank line before `{% <tag> ... %}` tag groups. Requires djLint ≥ 1.25."
},
"djlint.closeVoidTags": {
"type": "boolean",
"default": false,
"markdownDescription": "Add closing mark on known void tags. Ex: `<img>` becomes `<img />`. Requires djLint ≥ 1.26."
},
"djlint.configuration": {
"type": "string",
"default": "",
"description": "Path to the configuration file. The path can be relative to the workspace root. Requires djLint ≥ 1.13 for .djlintrc format and ≥ 1.34 for TOML."
},
"djlint.customBlocks": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Indent custom template blocks. Requires djLint ≥ 1.25."
},
"djlint.customHtml": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Indent custom HTML tags. Requires djLint ≥ 1.25."
},
"djlint.enableLinting": {
"type": "boolean",
"default": false,
"scope": "language-overridable",
"description": "Lint for common issues. Don't enable globally, instead enable for each language individually."
},
"djlint.executablePath": {
"type": "string",
"minLength": 1,
"default": "djlint",
"markdownDescription": "Path to the djLint executable. Relative paths are resolved from the workspace root. Used when `#djlint.useVenv#` is disabled, before falling back to `#djlint.pythonPath#`."
},
"djlint.exclude": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Override the default exclude paths. Requires djLint ≥ 1.25."
},
"djlint.extendExclude": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Add additional paths to the default exclude. Requires djLint ≥ 1.25."
},
"djlint.formatAttributeJsJson": {
"type": "boolean",
"default": false,
"description": "Format JavaScript and JSON code inside HTML attributes. Requires djLint ≥ 1.37.0."
},
"djlint.formatAttributeJsJsonMinProps": {
"type": [
"integer",
null
],
"default": null,
"description": "Minimum number of properties required in a JavaScript/JSON object for attribute formatting. Requires djLint ≥ 1.37.0."
},
"djlint.formatAttributeJsJsonPattern": {
"type": "string",
"default": "",
"description": "Regex pattern for JavaScript/JSON attributes to format. Requires djLint ≥ 1.37.0."
},
"djlint.formatAttributeTemplateTags": {
"type": "boolean",
"default": false,
"description": "Attempt to format template syntax inside of tag attributes. Requires djLint ≥ 1.25."
},
"djlint.formatCss": {
"type": "boolean",
"default": false,
"markdownDescription": "Also format contents of `<style>` tags. Requires djLint ≥ 1.9."
},
"djlint.formatLanguages": {
"type": "array",
"items": {
"type": "string"
},
"default": [
"django-html",
"jinja",
"jinja-html",
"jinja2",
"html-hubl",
"hubl-html",
"twig",
"html-nunjucks",
"njk",
"nunjucks",
"handlebars",
"hbs",
"spacebars",
"liquid",
"jekyll",
"go-template",
"go-tmpl",
"gotemplate",
"GoTemplate",
"gohtml",
"GoHTML",
"gotmpl",
"hugo-html",
"mustache",
"htmlmustache",
"tera",
"askama-html",
"html"
],
"description": "Language IDs for which djLint should be registered as a formatter."
},
"djlint.formatJs": {
"type": "boolean",
"default": false,
"markdownDescription": "Also format contents of `<script>` tags. Requires djLint ≥ 1.9."
},
"djlint.ignore": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Codes to ignore. Requires djLint ≥ 0.1.5."
},
"djlint.ignoreBlocks": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Template blocks to not indent. Requires djLint ≥ 1.24."
},
"djlint.ignoreCase": {
"type": "boolean",
"default": false,
"description": "Do not fix case on known html tags. Requires djLint ≥ 1.23."
},
"djlint.include": {
"type": "array",
"items": {
"type": "string"
},
"default": [],
"description": "Codes to include. Requires djLint ≥ 1.20."
},
"djlint.indentCss": {
"type": [
"integer",
null
],
"default": null,
"description": "CSS indent level. Requires djLint ≥ 1.25."
},
"djlint.indentJs": {
"type": [
"integer",
null
],
"default": null,
"description": "JS indent level. Requires djLint ≥ 1.25."
},
"djlint.lineBreakAfterMultilineTag": {
"type": "boolean",
"default": false,
"description": "Do not condense the content of multi-line tags into the line of the last attribute. Requires djLint ≥ 1.27."
},
"djlint.maxAttributeLength": {
"type": [
"integer",
null
],
"default": null,
"description": "Max attribute length. Requires djLint ≥ 1.25."
},
"djlint.maxBlankLines": {
"type": [
"integer",
null
],
"default": null,
"description": "Consolidate blank lines down to x lines. Requires djLint ≥ 1.31."
},
"djlint.maxLineLength": {
"type": [
"integer",
null
],
"default": null,
"description": "Max line length. Requires djLint ≥ 1.25."
},
"djlint.noFunctionFormatting": {
"type": "boolean",
"default": false,
"description": "Do not attempt to format function contents. Requires djLint ≥ 1.30.2."
},
"djlint.noLineAfterYaml": {
"type": "boolean",
"default": false,
"description": "Do not add a blank line after yaml front matter. Requires djLint ≥ 1.29."
},
"djlint.noSetFormatting": {
"type": "boolean",
"default": false,
"description": "Do not attempt to format set contents. Requires djLint ≥ 1.30.2."
},
"djlint.preserveBlankLines": {
"type": "boolean",
"default": false,
"description": "Attempt to preserve blank lines. Requires djLint ≥ 1.3."
},
"djlint.preserveClassNewlines": {
"type": "boolean",
"default": false,
"description": "Preserve line breaks inside multiline class attributes. Requires djLint ≥ 1.39.0."
},
"djlint.preserveLeadingSpace": {
"type": "boolean",
"default": false,
"description": "Attempt to preserve leading space on text. Requires djLint ≥ 1.2."
},
"djlint.profile": {
"type": "string",
"enum": [
"",
"django",
"jinja",
"nunjucks",
"handlebars",
"liquid",
"golang",
"angular",
"tera",
"askama",
"html"
],
"default": "",
"scope": "language-overridable",
"description": "Enable defaults by template language. Requires djLint ≥ 0.4.5; the askama, tera and liquid profiles require djLint ≥ 1.42."
},
"djlint.pythonPath": {
"type": "string",
"minLength": 1,
"default": "python",
"markdownDescription": "Path to the desired Python interpreter. Relative paths are resolved from the workspace root. Used as a fallback when `#djlint.useVenv#` is disabled and `#djlint.executablePath#` is not available.",
"markdownDeprecationMessage": "Prefer `#djlint.executablePath#` for direct djLint executables. `#djlint.pythonPath#` remains available as a Python fallback."
},
"djlint.requirePragma": {
"type": "boolean",
"default": false,
"markdownDescription": "Only format or lint files that start with a comment with the text `djlint:on`. Requires djLint ≥ 0.5.8."
},
"djlint.rules": {
"type": "string",
"default": "",
"description": "Path to a custom rules file in .djlint_rules.yaml format. The path can be relative to the workspace root. Requires djLint ≥ 1.41."
},
"djlint.showInstallError": {
"type": "boolean",
"default": true,
"description": "Show error message when djLint is not installed."
},
"djlint.singleAttributePerLine": {
"type": "boolean",
"default": false,
"description": "When an opening tag wraps, put each attribute on its own line. Requires djLint ≥ 1.40."
},
"djlint.useEditorIndentation": {
"type": "boolean",
"default": true,
"markdownDescription": "Get the number of indent spaces from VS Code (see the `#editor.tabSize#` setting). Disable to get it from the djLint config file. Requires djLint ≥ 0.4.3."
},
"djlint.useGitignore": {
"type": "boolean",
"default": false,
"description": "Use .gitignore file to extend excludes. Requires djLint ≥ 0.5.9."
},
"djlint.useNewLinterOutputParser": {
"type": "boolean",
"default": true,
"markdownDescription": "Use a new, more reliable linter output parser. If you disable this setting, make sure that you have not changed the `linter_output_format` setting in the djLint configuration file. Requires djLint ≥ 1.25."
},
"djlint.useVenv": {
"type": "boolean",
"default": true,
"markdownDescription": "Use the Python executable from the current active environment. When enabled, `#djlint.executablePath#` and `#djlint.pythonPath#` are ignored. Disable this to try `#djlint.executablePath#` (`djlint` from PATH by default) before falling back to `#djlint.pythonPath#`."
}
}
},
"configurationDefaults": {
"[django-html]": {
"djlint.enableLinting": true,
"djlint.profile": "django"
},
"[jinja]": {
"djlint.enableLinting": true,
"djlint.profile": "jinja"
},
"[jinja-html]": {
"djlint.enableLinting": true,
"djlint.profile": "jinja"
},
"[jinja2]": {
"djlint.enableLinting": true,
"djlint.profile": "jinja"
},
"[html-hubl]": {
"djlint.enableLinting": true,
"djlint.profile": "jinja"
},
"[hubl-html]": {
"djlint.enableLinting": true,
"djlint.profile": "jinja"
},
"[twig]": {
"djlint.enableLinting": true,
"djlint.profile": "nunjucks"
},
"[html-nunjucks]": {
"djlint.enableLinting": true,
"djlint.profile": "nunjucks"
},
"[njk]": {
"djlint.enableLinting": true,
"djlint.profile": "nunjucks"
},
"[nunjucks]": {
"djlint.enableLinting": true,
"djlint.profile": "nunjucks"
},
"[handlebars]": {
"djlint.enableLinting": true,
"djlint.profile": "handlebars"
},
"[hbs]": {
"djlint.enableLinting": true,
"djlint.profile": "handlebars"
},
"[spacebars]": {
"djlint.enableLinting": true,
"djlint.profile": "handlebars"
},
"[liquid]": {
"djlint.enableLinting": true,
"djlint.profile": "liquid"
},
"[jekyll]": {
"djlint.enableLinting": true,
"djlint.profile": "liquid"
},
"[go-template]": {
"djlint.enableLinting": true,
"djlint.profile": "golang"
},
"[go-tmpl]": {
"djlint.enableLinting": true,
"djlint.profile": "golang"
},
"[gotemplate]": {
"djlint.enableLinting": true,
"djlint.profile": "golang"
},
"[GoTemplate]": {
"djlint.enableLinting": true,
"djlint.profile": "golang"
},
"[gohtml]": {
"djlint.enableLinting": true,
"djlint.profile": "golang"
},
"[GoHTML]": {
"djlint.enableLinting": true,
"djlint.profile": "golang"
},
"[gotmpl]": {
"djlint.enableLinting": true,
"djlint.profile": "golang"
},
"[hugo-html]": {
"djlint.enableLinting": true,
"djlint.profile": "golang"
},
"[mustache]": {
"djlint.enableLinting": true,
"djlint.profile": "handlebars"
},
"[htmlmustache]": {
"djlint.enableLinting": true,
"djlint.profile": "handlebars"
},
"[tera]": {
"djlint.enableLinting": true,
"djlint.profile": "tera"
},
"[askama-html]": {
"djlint.enableLinting": true,
"djlint.profile": "askama"
},
"[html]": {
"djlint.enableLinting": true
}
}
},
"activationEvents": [
"onStartupFinished"
],
"dependencies": {
"@vscode/python-extension": "1.0.6",
"execa": "10.0.1"
},
"devDependencies": {
"@eslint/js": "10.0.1",
"@ianvs/prettier-plugin-sort-imports": "4.7.1",
"@total-typescript/ts-reset": "0.6.1",
"@tsconfig/node22": "22.0.5",
"@tsconfig/strictest": "2.0.8",
"@types/node": "22.20.1",
"@types/vscode": "1.107.0",
"esbuild": "0.28.1",
"eslint": "10.8.1",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-unicorn": "73.0.0",
"prettier": "3.9.6",
"prettier-plugin-packagejson": "3.0.2",
"typescript": "6.0.3",
"typescript-eslint": "8.66.0"
},
"engines": {
"vscode": "^1.107.0"
},
"icon": "icon.png"
}