prettier-plugin-embed 0.6.0 → 0.7.1
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 +362 -51
- package/dist/embedded/astro/embedder.d.ts +7 -0
- package/dist/embedded/astro/index.d.ts +3 -0
- package/dist/embedded/astro/language.d.ts +6 -0
- package/dist/embedded/astro/options.d.ts +40 -0
- package/dist/embedded/create-embedder.d.ts +14 -0
- package/dist/embedded/css/embedder.d.ts +1 -6
- package/dist/embedded/dockerfile/embedder.d.ts +7 -0
- package/dist/embedded/dockerfile/index.d.ts +3 -0
- package/dist/embedded/dockerfile/language.d.ts +6 -0
- package/dist/embedded/dockerfile/options.d.ts +40 -0
- package/dist/embedded/es/embedder.d.ts +1 -6
- package/dist/embedded/gherkin/embedder.d.ts +7 -0
- package/dist/embedded/gherkin/index.d.ts +3 -0
- package/dist/embedded/gherkin/language.d.ts +6 -0
- package/dist/embedded/gherkin/options.d.ts +40 -0
- package/dist/embedded/glsl/embedder.d.ts +1 -6
- package/dist/embedded/go-template/embedder.d.ts +7 -0
- package/dist/embedded/go-template/index.d.ts +3 -0
- package/dist/embedded/go-template/language.d.ts +6 -0
- package/dist/embedded/go-template/options.d.ts +40 -0
- package/dist/embedded/graphql/embedder.d.ts +1 -6
- package/dist/embedded/handlebars/embedder.d.ts +7 -0
- package/dist/embedded/handlebars/index.d.ts +3 -0
- package/dist/embedded/handlebars/language.d.ts +6 -0
- package/dist/embedded/handlebars/options.d.ts +40 -0
- package/dist/embedded/html/embedder.d.ts +1 -6
- package/dist/embedded/hugo/embedder.d.ts +7 -0
- package/dist/embedded/hugo/index.d.ts +3 -0
- package/dist/embedded/hugo/language.d.ts +6 -0
- package/dist/embedded/hugo/options.d.ts +40 -0
- package/dist/embedded/ini/embedder.d.ts +1 -6
- package/dist/embedded/java/embedder.d.ts +1 -6
- package/dist/embedded/jinja/embedder.d.ts +7 -0
- package/dist/embedded/jinja/index.d.ts +3 -0
- package/dist/embedded/jinja/language.d.ts +6 -0
- package/dist/embedded/jinja/options.d.ts +40 -0
- package/dist/embedded/jsonata/embedder.d.ts +1 -6
- package/dist/embedded/jte/embedder.d.ts +7 -0
- package/dist/embedded/jte/index.d.ts +3 -0
- package/dist/embedded/jte/language.d.ts +6 -0
- package/dist/embedded/jte/options.d.ts +40 -0
- package/dist/embedded/latex/embedder.d.ts +1 -6
- package/dist/embedded/liquid/embedder.d.ts +7 -0
- package/dist/embedded/liquid/index.d.ts +3 -0
- package/dist/embedded/liquid/language.d.ts +6 -0
- package/dist/embedded/liquid/options.d.ts +40 -0
- package/dist/embedded/marko/embedder.d.ts +7 -0
- package/dist/embedded/marko/index.d.ts +3 -0
- package/dist/embedded/marko/language.d.ts +6 -0
- package/dist/embedded/marko/options.d.ts +40 -0
- package/dist/embedded/motoko/embedder.d.ts +7 -0
- package/dist/embedded/motoko/index.d.ts +3 -0
- package/dist/embedded/motoko/language.d.ts +6 -0
- package/dist/embedded/motoko/options.d.ts +40 -0
- package/dist/embedded/mustache/embedder.d.ts +7 -0
- package/dist/embedded/mustache/index.d.ts +3 -0
- package/dist/embedded/mustache/language.d.ts +6 -0
- package/dist/embedded/mustache/options.d.ts +40 -0
- package/dist/embedded/nginx/embedder.d.ts +1 -6
- package/dist/embedded/nunjucks/embedder.d.ts +7 -0
- package/dist/embedded/nunjucks/index.d.ts +3 -0
- package/dist/embedded/nunjucks/language.d.ts +6 -0
- package/dist/embedded/nunjucks/options.d.ts +40 -0
- package/dist/embedded/pegjs/embedder.d.ts +1 -6
- package/dist/embedded/php/embedder.d.ts +1 -6
- package/dist/embedded/powershell/embedder.d.ts +7 -0
- package/dist/embedded/powershell/index.d.ts +3 -0
- package/dist/embedded/powershell/language.d.ts +6 -0
- package/dist/embedded/powershell/options.d.ts +40 -0
- package/dist/embedded/prisma/embedder.d.ts +1 -6
- package/dist/embedded/properties/embedder.d.ts +1 -6
- package/dist/embedded/pug/embedder.d.ts +1 -6
- package/dist/embedded/register.d.ts +42 -25
- package/dist/embedded/ruby/embedder.d.ts +1 -6
- package/dist/embedded/sh/embedder.d.ts +1 -6
- package/dist/embedded/solidity/embedder.d.ts +7 -0
- package/dist/embedded/solidity/index.d.ts +3 -0
- package/dist/embedded/solidity/language.d.ts +6 -0
- package/dist/embedded/solidity/options.d.ts +58 -0
- package/dist/embedded/svelte/embedder.d.ts +7 -0
- package/dist/embedded/svelte/index.d.ts +3 -0
- package/dist/embedded/svelte/language.d.ts +6 -0
- package/dist/embedded/svelte/options.d.ts +40 -0
- package/dist/embedded/toml/embedder.d.ts +1 -6
- package/dist/embedded/ts/embedder.d.ts +1 -6
- package/dist/embedded/utils.d.ts +1 -1
- package/dist/embedded/xquery/embedder.d.ts +7 -0
- package/dist/embedded/xquery/index.d.ts +3 -0
- package/dist/embedded/xquery/language.d.ts +6 -0
- package/dist/embedded/xquery/options.d.ts +55 -0
- package/dist/index.js +1126 -819
- package/dist/options.d.ts +335 -0
- package/package.json +18 -1
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ Install Prettier 3 in the project that runs formatting. The consumer supplies th
|
|
|
56
56
|
|
|
57
57
|
Install the formatter plugin for each embedded language you use as a separate project dependency; the [Language-Specific Options](#language-specific-options) section shows which integrations require one.
|
|
58
58
|
|
|
59
|
-
Choose
|
|
59
|
+
Choose Prettier and runtime versions supported by every loaded language plugin. Parser availability and syntax support follow the installed formatter version.
|
|
60
60
|
|
|
61
61
|
<details>
|
|
62
62
|
<summary>Dependency resolution in strict installations</summary>
|
|
@@ -129,7 +129,7 @@ Set [`embeddedLanguageFormatting`](https://prettier.io/docs/options#embedded-lan
|
|
|
129
129
|
|
|
130
130
|
This plugin uses Prettier's built-in parsers and existing [language plugins](https://prettier.io/docs/plugins#official-plugins), adding the integration needed to format their languages inside template literals.
|
|
131
131
|
|
|
132
|
-
Install and load the formatter plugin for each additional language you use. For example, embedded XML requires both this plugin and [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml). The [Language-Specific Options](#language-specific-options) section lists the required plugins.
|
|
132
|
+
Install and load the formatter plugin for each additional language you use. For example, embedded XML requires both this plugin and [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml#readme). The [Language-Specific Options](#language-specific-options) section lists the required plugins.
|
|
133
133
|
|
|
134
134
|
A preceding [block comment](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#block_comments) such as `` /* xml */ `...` `` or a [tag](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#tagged_templates) such as `` xml`...` `` identifies the embedded language. Configure each language with `embedded<Language>Comments` and `embedded<Language>Tags`. A leading block comment is checked first; templates without one are matched by their tag.
|
|
135
135
|
|
|
@@ -154,29 +154,46 @@ Add comments or tags to `embeddedNoopComments` or `embeddedNoopTags` to preserve
|
|
|
154
154
|
|
|
155
155
|
Supported embedded languages and their default comment/tag identifiers are:
|
|
156
156
|
|
|
157
|
+
- [Astro](#astro): `astro`
|
|
157
158
|
- [CSS](#css): `css`
|
|
159
|
+
- [Dockerfile](#dockerfile): `dockerfile`, `containerfile`
|
|
158
160
|
- [ES (ECMAScript/JavaScript)](#es-ecmascriptjavascript): `js`, `jsx`, `es`, `es6`, `mjs`, `cjs`, `pac`, `javascript`
|
|
161
|
+
- [Gherkin](#gherkin): `gherkin`, `feature`
|
|
159
162
|
- [GLSL](#glsl): `glsl`, `shader`
|
|
163
|
+
- [Go Template](#go-template): `goTemplate`, `gotmpl`
|
|
160
164
|
- [GraphQL](#graphql): `graphql`, `gql`
|
|
165
|
+
- [Handlebars](#handlebars): `handlebars`, `hbs`
|
|
161
166
|
- [HTML](#html): `html`, `xhtml`
|
|
167
|
+
- [Hugo](#hugo): `hugo`, `hugoPost`
|
|
162
168
|
- [INI](#ini): `ini`, `cfg`, `pro`
|
|
163
169
|
- [Java](#java): `java`
|
|
170
|
+
- [Jinja](#jinja): `jinja`, `jinja2`, `j2`
|
|
164
171
|
- [JSON](#json): `json`, `jsonl`
|
|
165
172
|
- [JSONata](#jsonata): `jsonata`
|
|
173
|
+
- [JTE](#jte): `jte`
|
|
166
174
|
- [LaTeX](#latex): `latex`, `tex`, `aux`, `cls`, `bbl`, `bib`, `toc`, `sty`
|
|
175
|
+
- [Liquid](#liquid): `liquid`
|
|
167
176
|
- [Markdown](#markdown): `md`, `markdown`
|
|
177
|
+
- [Marko](#marko): `marko`
|
|
178
|
+
- [Motoko](#motoko): `motoko`, `mo`
|
|
179
|
+
- [Mustache](#mustache): `mustache`
|
|
168
180
|
- [NGINX](#nginx): `nginx`
|
|
181
|
+
- [Nunjucks](#nunjucks): `nunjucks`, `njk`
|
|
169
182
|
- [Pegjs](#pegjs): `pegjs`, `peggy`, `peg`
|
|
170
183
|
- [PHP](#php): `php`, `php5`
|
|
184
|
+
- [PowerShell](#powershell): `powershell`, `ps1`
|
|
171
185
|
- [Prisma](#prisma): `prisma`
|
|
172
186
|
- [Properties](#properties): `properties`
|
|
173
187
|
- [Pug](#pug): `pug`, `jade`
|
|
174
188
|
- [Ruby](#ruby): `ruby`
|
|
175
189
|
- [Sh (Shell)](#sh-shell): `sh`
|
|
190
|
+
- [Solidity](#solidity): `solidity`, `sol`
|
|
176
191
|
- [SQL](#sql): `sql`
|
|
192
|
+
- [Svelte](#svelte): `svelte`
|
|
177
193
|
- [TOML](#toml): `toml`
|
|
178
194
|
- [TS (TypeScript)](#ts-typescript): `ts`, `tsx`, `cts`, `mts`, `typescript`
|
|
179
195
|
- [XML](#xml): `xml`, `opml`, `rss`, `svg`
|
|
196
|
+
- [XQuery](#xquery): `xquery`, `xq`
|
|
180
197
|
- [YAML](#yaml): `yaml`, `yml`
|
|
181
198
|
|
|
182
199
|
<details open>
|
|
@@ -200,6 +217,22 @@ Click Here to Toggle
|
|
|
200
217
|
|
|
201
218
|
This built-in option can override native embedded language formatting for the specified comments or tags, preserving their template literal content as written.
|
|
202
219
|
|
|
220
|
+
#### Astro
|
|
221
|
+
|
|
222
|
+
##### `embeddedAstroComments`
|
|
223
|
+
|
|
224
|
+
- **Type**: `string[]`
|
|
225
|
+
- **Default**: [`["astro"]`](./src/embedded/astro/options.ts)
|
|
226
|
+
- **Description**: Block comments that identify embedded Astro in template literals. Requires the [`prettier-plugin-astro`](https://github.com/withastro/prettier-plugin-astro#readme) plugin.
|
|
227
|
+
|
|
228
|
+
##### `embeddedAstroTags`
|
|
229
|
+
|
|
230
|
+
- **Type**: `string[]`
|
|
231
|
+
- **Default**: [`["astro"]`](./src/embedded/astro/options.ts)
|
|
232
|
+
- **Description**: Tags that identify embedded Astro in template literals. Requires the [`prettier-plugin-astro`](https://github.com/withastro/prettier-plugin-astro#readme) plugin.
|
|
233
|
+
|
|
234
|
+
Formatting embedded Astro requires the [`prettier-plugin-astro`](https://github.com/withastro/prettier-plugin-astro#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
235
|
+
|
|
203
236
|
#### CSS
|
|
204
237
|
|
|
205
238
|
##### `embeddedCssComments`
|
|
@@ -226,6 +259,24 @@ This can override the native formatting behavior for embedded CSS language. If y
|
|
|
226
259
|
|
|
227
260
|
If you want to specify different parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).
|
|
228
261
|
|
|
262
|
+
#### Dockerfile
|
|
263
|
+
|
|
264
|
+
##### `embeddedDockerfileComments`
|
|
265
|
+
|
|
266
|
+
- **Type**: `string[]`
|
|
267
|
+
- **Default**: [`["dockerfile", "containerfile"]`](./src/embedded/dockerfile/options.ts)
|
|
268
|
+
- **Description**: Block comments that identify embedded Dockerfile in template literals. Requires the [`prettier-plugin-sh`](https://github.com/un-ts/prettier/tree/master/packages/sh#readme) plugin.
|
|
269
|
+
|
|
270
|
+
##### `embeddedDockerfileTags`
|
|
271
|
+
|
|
272
|
+
- **Type**: `string[]`
|
|
273
|
+
- **Default**: [`["dockerfile", "containerfile"]`](./src/embedded/dockerfile/options.ts)
|
|
274
|
+
- **Description**: Tags that identify embedded Dockerfile in template literals. Requires the [`prettier-plugin-sh`](https://github.com/un-ts/prettier/tree/master/packages/sh#readme) plugin.
|
|
275
|
+
|
|
276
|
+
Formatting embedded Dockerfile requires the [`prettier-plugin-sh`](https://github.com/un-ts/prettier/tree/master/packages/sh#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
277
|
+
|
|
278
|
+
Dockerfile and Shell share `prettier-plugin-sh`; the Dockerfile integration selects its `dockerfile` parser.
|
|
279
|
+
|
|
229
280
|
#### ES (ECMAScript/JavaScript)
|
|
230
281
|
|
|
231
282
|
##### `embeddedEsComments`
|
|
@@ -250,21 +301,53 @@ Embedded ECMAScript and JavaScript use the parsers and printers included with Pr
|
|
|
250
301
|
|
|
251
302
|
If you want to specify different parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).
|
|
252
303
|
|
|
304
|
+
#### Gherkin
|
|
305
|
+
|
|
306
|
+
##### `embeddedGherkinComments`
|
|
307
|
+
|
|
308
|
+
- **Type**: `string[]`
|
|
309
|
+
- **Default**: [`["gherkin", "feature"]`](./src/embedded/gherkin/options.ts)
|
|
310
|
+
- **Description**: Block comments that identify embedded Gherkin in template literals. Requires the [`prettier-plugin-gherkin`](https://github.com/mapado/prettier-plugin-gherkin#readme) plugin.
|
|
311
|
+
|
|
312
|
+
##### `embeddedGherkinTags`
|
|
313
|
+
|
|
314
|
+
- **Type**: `string[]`
|
|
315
|
+
- **Default**: [`["gherkin", "feature"]`](./src/embedded/gherkin/options.ts)
|
|
316
|
+
- **Description**: Tags that identify embedded Gherkin in template literals. Requires the [`prettier-plugin-gherkin`](https://github.com/mapado/prettier-plugin-gherkin#readme) plugin.
|
|
317
|
+
|
|
318
|
+
Formatting embedded Gherkin requires the [`prettier-plugin-gherkin`](https://github.com/mapado/prettier-plugin-gherkin#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
319
|
+
|
|
253
320
|
#### GLSL
|
|
254
321
|
|
|
255
322
|
##### `embeddedGlslComments`
|
|
256
323
|
|
|
257
324
|
- **Type**: `string[]`
|
|
258
325
|
- **Default**: [`["glsl", "shader"]`](./src/embedded/glsl/options.ts)
|
|
259
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin.
|
|
326
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded GLSL language. This option requires the [`prettier-plugin-glsl`](https://github.com/NaridaL/glsl-language-toolkit/tree/main/packages/prettier-plugin-glsl#readme) plugin.
|
|
260
327
|
|
|
261
328
|
##### `embeddedGlslTags`
|
|
262
329
|
|
|
263
330
|
- **Type**: `string[]`
|
|
264
331
|
- **Default**: [`["glsl", "shader"]`](./src/embedded/glsl/options.ts)
|
|
265
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded GLSL language. This option requires the `prettier-plugin-glsl` plugin.
|
|
332
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded GLSL language. This option requires the [`prettier-plugin-glsl`](https://github.com/NaridaL/glsl-language-toolkit/tree/main/packages/prettier-plugin-glsl#readme) plugin.
|
|
333
|
+
|
|
334
|
+
Formatting embedded GLSL language requires the [`prettier-plugin-glsl`](https://github.com/NaridaL/glsl-language-toolkit/tree/main/packages/prettier-plugin-glsl#readme) plugin to be loaded as well.
|
|
335
|
+
|
|
336
|
+
#### Go Template
|
|
337
|
+
|
|
338
|
+
##### `embeddedGoTemplateComments`
|
|
266
339
|
|
|
267
|
-
|
|
340
|
+
- **Type**: `string[]`
|
|
341
|
+
- **Default**: [`["goTemplate", "gotmpl"]`](./src/embedded/go-template/options.ts)
|
|
342
|
+
- **Description**: Block comments that identify embedded Go Template in template literals. Requires the [`@htnabe/prettier-plugin-go-template`](https://github.com/htnabe/prettier-plugin-go-template#readme) plugin.
|
|
343
|
+
|
|
344
|
+
##### `embeddedGoTemplateTags`
|
|
345
|
+
|
|
346
|
+
- **Type**: `string[]`
|
|
347
|
+
- **Default**: [`["goTemplate", "gotmpl"]`](./src/embedded/go-template/options.ts)
|
|
348
|
+
- **Description**: Tags that identify embedded Go Template in template literals. Requires the [`@htnabe/prettier-plugin-go-template`](https://github.com/htnabe/prettier-plugin-go-template#readme) plugin.
|
|
349
|
+
|
|
350
|
+
Formatting embedded Go Template requires the [`@htnabe/prettier-plugin-go-template`](https://github.com/htnabe/prettier-plugin-go-template#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
268
351
|
|
|
269
352
|
#### GraphQL
|
|
270
353
|
|
|
@@ -284,6 +367,22 @@ Embedded GraphQL uses the parsers and printers included with Prettier.
|
|
|
284
367
|
|
|
285
368
|
This can override the native formatting behavior for embedded GraphQL language. If you want to keep the native behavior, set `embeddedGraphqlComments` or `embeddedGraphqlTags` to `[]` or other values.
|
|
286
369
|
|
|
370
|
+
#### Handlebars
|
|
371
|
+
|
|
372
|
+
##### `embeddedHandlebarsComments`
|
|
373
|
+
|
|
374
|
+
- **Type**: `string[]`
|
|
375
|
+
- **Default**: [`["handlebars", "hbs"]`](./src/embedded/handlebars/options.ts)
|
|
376
|
+
- **Description**: Block comments that identify embedded Handlebars in template literals. Requires the [`@poliklot/prettier-plugin-handlebars`](https://github.com/Poliklot/prettier-plugin-handlebars#readme) plugin.
|
|
377
|
+
|
|
378
|
+
##### `embeddedHandlebarsTags`
|
|
379
|
+
|
|
380
|
+
- **Type**: `string[]`
|
|
381
|
+
- **Default**: [`["handlebars", "hbs"]`](./src/embedded/handlebars/options.ts)
|
|
382
|
+
- **Description**: Tags that identify embedded Handlebars in template literals. Requires the [`@poliklot/prettier-plugin-handlebars`](https://github.com/Poliklot/prettier-plugin-handlebars#readme) plugin.
|
|
383
|
+
|
|
384
|
+
Formatting embedded Handlebars requires the [`@poliklot/prettier-plugin-handlebars`](https://github.com/Poliklot/prettier-plugin-handlebars#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
385
|
+
|
|
287
386
|
#### HTML
|
|
288
387
|
|
|
289
388
|
##### `embeddedHtmlComments`
|
|
@@ -310,21 +409,37 @@ This can override the native formatting behavior for embedded HTML language. If
|
|
|
310
409
|
|
|
311
410
|
If you want to specify different parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).
|
|
312
411
|
|
|
412
|
+
#### Hugo
|
|
413
|
+
|
|
414
|
+
##### `embeddedHugoComments`
|
|
415
|
+
|
|
416
|
+
- **Type**: `string[]`
|
|
417
|
+
- **Default**: [`["hugo", "hugoPost"]`](./src/embedded/hugo/options.ts)
|
|
418
|
+
- **Description**: Block comments that identify embedded Hugo in template literals. Requires the [`@htnabe/prettier-plugin-hugo-post`](https://github.com/htnabe/prettier-plugin-hugo-post#readme) plugin.
|
|
419
|
+
|
|
420
|
+
##### `embeddedHugoTags`
|
|
421
|
+
|
|
422
|
+
- **Type**: `string[]`
|
|
423
|
+
- **Default**: [`["hugo", "hugoPost"]`](./src/embedded/hugo/options.ts)
|
|
424
|
+
- **Description**: Tags that identify embedded Hugo in template literals. Requires the [`@htnabe/prettier-plugin-hugo-post`](https://github.com/htnabe/prettier-plugin-hugo-post#readme) plugin.
|
|
425
|
+
|
|
426
|
+
Formatting embedded Hugo requires the [`@htnabe/prettier-plugin-hugo-post`](https://github.com/htnabe/prettier-plugin-hugo-post#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
427
|
+
|
|
313
428
|
#### INI
|
|
314
429
|
|
|
315
430
|
##### `embeddedIniComments`
|
|
316
431
|
|
|
317
432
|
- **Type**: `string[]`
|
|
318
433
|
- **Default**: [`["ini", "cfg", "pro"]`](./src/embedded/ini/options.ts)
|
|
319
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin.
|
|
434
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded INI language. This option requires the [`prettier-plugin-ini`](https://github.com/kddnewton/prettier-plugin-ini#readme) plugin.
|
|
320
435
|
|
|
321
436
|
##### `embeddedIniTags`
|
|
322
437
|
|
|
323
438
|
- **Type**: `string[]`
|
|
324
439
|
- **Default**: [`["ini", "cfg", "pro"]`](./src/embedded/ini/options.ts)
|
|
325
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded INI language. This option requires the `prettier-plugin-ini` plugin.
|
|
440
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded INI language. This option requires the [`prettier-plugin-ini`](https://github.com/kddnewton/prettier-plugin-ini#readme) plugin.
|
|
326
441
|
|
|
327
|
-
Formatting embedded INI language requires the [`prettier-plugin-ini`](https://github.com/kddnewton/prettier-plugin-ini) plugin to be loaded as well. And [options](https://github.com/kddnewton/prettier-plugin-ini#configuration) supported by `prettier-plugin-ini` can therefore be used to further control the formatting behavior.
|
|
442
|
+
Formatting embedded INI language requires the [`prettier-plugin-ini`](https://github.com/kddnewton/prettier-plugin-ini#readme) plugin to be loaded as well. And [options](https://github.com/kddnewton/prettier-plugin-ini#configuration) supported by `prettier-plugin-ini` can therefore be used to further control the formatting behavior.
|
|
328
443
|
|
|
329
444
|
#### Java
|
|
330
445
|
|
|
@@ -332,15 +447,33 @@ Formatting embedded INI language requires the [`prettier-plugin-ini`](https://gi
|
|
|
332
447
|
|
|
333
448
|
- **Type**: `string[]`
|
|
334
449
|
- **Default**: [`["java"]`](./src/embedded/java/options.ts)
|
|
335
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin.
|
|
450
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded Java language. This option requires the [`prettier-plugin-java`](https://github.com/jhipster/prettier-java#readme) plugin.
|
|
336
451
|
|
|
337
452
|
##### `embeddedJavaTags`
|
|
338
453
|
|
|
339
454
|
- **Type**: `string[]`
|
|
340
455
|
- **Default**: [`["java"]`](./src/embedded/java/options.ts)
|
|
341
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded Java language. This option requires the `prettier-plugin-java` plugin.
|
|
456
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded Java language. This option requires the [`prettier-plugin-java`](https://github.com/jhipster/prettier-java#readme) plugin.
|
|
457
|
+
|
|
458
|
+
Formatting embedded Java language requires the [`prettier-plugin-java`](https://github.com/jhipster/prettier-java#readme) plugin to be loaded as well. And [options](https://github.com/jhipster/prettier-java/blob/main/docs/advanced_usage.md#configuration) supported by `prettier-plugin-java` can therefore be used to further control the formatting behavior.
|
|
459
|
+
|
|
460
|
+
#### Jinja
|
|
461
|
+
|
|
462
|
+
##### `embeddedJinjaComments`
|
|
463
|
+
|
|
464
|
+
- **Type**: `string[]`
|
|
465
|
+
- **Default**: [`["jinja", "jinja2", "j2"]`](./src/embedded/jinja/options.ts)
|
|
466
|
+
- **Description**: Block comments that identify embedded Jinja in template literals. Requires the [`prettier-plugin-jinja-template`](https://github.com/davidodenwald/prettier-plugin-jinja-template#readme) plugin.
|
|
467
|
+
|
|
468
|
+
##### `embeddedJinjaTags`
|
|
342
469
|
|
|
343
|
-
|
|
470
|
+
- **Type**: `string[]`
|
|
471
|
+
- **Default**: [`["jinja", "jinja2", "j2"]`](./src/embedded/jinja/options.ts)
|
|
472
|
+
- **Description**: Tags that identify embedded Jinja in template literals. Requires the [`prettier-plugin-jinja-template`](https://github.com/davidodenwald/prettier-plugin-jinja-template#readme) plugin.
|
|
473
|
+
|
|
474
|
+
Formatting embedded Jinja requires the [`prettier-plugin-jinja-template`](https://github.com/davidodenwald/prettier-plugin-jinja-template#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
475
|
+
|
|
476
|
+
The formatter uses the source block's line breaks to choose its layout. Write block bodies across lines for consistent formatting when their content wraps.
|
|
344
477
|
|
|
345
478
|
#### JSON
|
|
346
479
|
|
|
@@ -372,15 +505,31 @@ If you want to specify different parsers for different comments or tags, check [
|
|
|
372
505
|
|
|
373
506
|
- **Type**: `string[]`
|
|
374
507
|
- **Default**: [`["jsonata"]`](./src/embedded/jsonata/options.ts)
|
|
375
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin.
|
|
508
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded JSONata language. This option requires the [`@stedi/prettier-plugin-jsonata`](https://www.npmjs.com/package/@stedi/prettier-plugin-jsonata) plugin.
|
|
376
509
|
|
|
377
510
|
##### `embeddedJsonataTags`
|
|
378
511
|
|
|
379
512
|
- **Type**: `string[]`
|
|
380
513
|
- **Default**: [`["jsonata"]`](./src/embedded/jsonata/options.ts)
|
|
381
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded JSONata language. This option requires the `@stedi/prettier-plugin-jsonata` plugin.
|
|
514
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded JSONata language. This option requires the [`@stedi/prettier-plugin-jsonata`](https://www.npmjs.com/package/@stedi/prettier-plugin-jsonata) plugin.
|
|
515
|
+
|
|
516
|
+
Formatting embedded JSONata language requires the [`@stedi/prettier-plugin-jsonata`](https://www.npmjs.com/package/@stedi/prettier-plugin-jsonata) plugin to be loaded as well.
|
|
517
|
+
|
|
518
|
+
#### JTE
|
|
519
|
+
|
|
520
|
+
##### `embeddedJteComments`
|
|
521
|
+
|
|
522
|
+
- **Type**: `string[]`
|
|
523
|
+
- **Default**: [`["jte"]`](./src/embedded/jte/options.ts)
|
|
524
|
+
- **Description**: Block comments that identify embedded JTE in template literals. Requires the [`prettier-plugin-jte`](https://github.com/sgruendel/prettier-plugin-jte#readme) plugin.
|
|
525
|
+
|
|
526
|
+
##### `embeddedJteTags`
|
|
382
527
|
|
|
383
|
-
|
|
528
|
+
- **Type**: `string[]`
|
|
529
|
+
- **Default**: [`["jte"]`](./src/embedded/jte/options.ts)
|
|
530
|
+
- **Description**: Tags that identify embedded JTE in template literals. Requires the [`prettier-plugin-jte`](https://github.com/sgruendel/prettier-plugin-jte#readme) plugin.
|
|
531
|
+
|
|
532
|
+
Formatting embedded JTE requires the [`prettier-plugin-jte`](https://github.com/sgruendel/prettier-plugin-jte#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
384
533
|
|
|
385
534
|
#### LaTeX
|
|
386
535
|
|
|
@@ -388,15 +537,31 @@ Formatting embedded JSONata language requires the [`@stedi/prettier-plugin-jsona
|
|
|
388
537
|
|
|
389
538
|
- **Type**: `string[]`
|
|
390
539
|
- **Default**: [`["latex", "tex", "aux", "cls", "bbl", "bib", "toc", "sty"]`](./src/embedded/latex/options.ts)
|
|
391
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin.
|
|
540
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded LaTeX language. This option requires the [`prettier-plugin-latex`](https://github.com/siefkenj/prettier-plugin-latex#readme) plugin.
|
|
392
541
|
|
|
393
542
|
##### `embeddedLatexTags`
|
|
394
543
|
|
|
395
544
|
- **Type**: `string[]`
|
|
396
545
|
- **Default**: [`["latex", "tex", "aux", "cls", "bbl", "bib", "toc", "sty"]`](./src/embedded/latex/options.ts)
|
|
397
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded LaTeX language. This option requires the `prettier-plugin-latex` plugin.
|
|
546
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded LaTeX language. This option requires the [`prettier-plugin-latex`](https://github.com/siefkenj/prettier-plugin-latex#readme) plugin.
|
|
547
|
+
|
|
548
|
+
Formatting embedded LaTeX language requires the [`prettier-plugin-latex`](https://github.com/siefkenj/prettier-plugin-latex#readme) plugin to be loaded as well.
|
|
549
|
+
|
|
550
|
+
#### Liquid
|
|
551
|
+
|
|
552
|
+
##### `embeddedLiquidComments`
|
|
398
553
|
|
|
399
|
-
|
|
554
|
+
- **Type**: `string[]`
|
|
555
|
+
- **Default**: [`["liquid"]`](./src/embedded/liquid/options.ts)
|
|
556
|
+
- **Description**: Block comments that identify embedded Liquid in template literals. Requires the [`@shopify/prettier-plugin-liquid`](https://github.com/Shopify/theme-tools/tree/main/packages/prettier-plugin-liquid#readme) plugin.
|
|
557
|
+
|
|
558
|
+
##### `embeddedLiquidTags`
|
|
559
|
+
|
|
560
|
+
- **Type**: `string[]`
|
|
561
|
+
- **Default**: [`["liquid"]`](./src/embedded/liquid/options.ts)
|
|
562
|
+
- **Description**: Tags that identify embedded Liquid in template literals. Requires the [`@shopify/prettier-plugin-liquid`](https://github.com/Shopify/theme-tools/tree/main/packages/prettier-plugin-liquid#readme) plugin.
|
|
563
|
+
|
|
564
|
+
Formatting embedded Liquid requires the [`@shopify/prettier-plugin-liquid`](https://github.com/Shopify/theme-tools/tree/main/packages/prettier-plugin-liquid#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
400
565
|
|
|
401
566
|
#### Markdown
|
|
402
567
|
|
|
@@ -426,21 +591,85 @@ If you want to specify different parsers for different comments or tags, check [
|
|
|
426
591
|
|
|
427
592
|
The `remark` parser is [an alias of the `markdown` parser](https://github.com/prettier/prettier/blob/ed23dacc9e655c3876971b30859497b17ff2cf9f/src/language-markdown/parser-markdown.js#L57).
|
|
428
593
|
|
|
594
|
+
#### Marko
|
|
595
|
+
|
|
596
|
+
##### `embeddedMarkoComments`
|
|
597
|
+
|
|
598
|
+
- **Type**: `string[]`
|
|
599
|
+
- **Default**: [`["marko"]`](./src/embedded/marko/options.ts)
|
|
600
|
+
- **Description**: Block comments that identify embedded Marko in template literals. Requires the [`prettier-plugin-marko`](https://github.com/marko-js/prettier#readme) plugin.
|
|
601
|
+
|
|
602
|
+
##### `embeddedMarkoTags`
|
|
603
|
+
|
|
604
|
+
- **Type**: `string[]`
|
|
605
|
+
- **Default**: [`["marko"]`](./src/embedded/marko/options.ts)
|
|
606
|
+
- **Description**: Tags that identify embedded Marko in template literals. Requires the [`prettier-plugin-marko`](https://github.com/marko-js/prettier#readme) plugin.
|
|
607
|
+
|
|
608
|
+
Formatting embedded Marko requires the [`prettier-plugin-marko`](https://github.com/marko-js/prettier#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
609
|
+
|
|
610
|
+
#### Motoko
|
|
611
|
+
|
|
612
|
+
##### `embeddedMotokoComments`
|
|
613
|
+
|
|
614
|
+
- **Type**: `string[]`
|
|
615
|
+
- **Default**: [`["motoko", "mo"]`](./src/embedded/motoko/options.ts)
|
|
616
|
+
- **Description**: Block comments that identify embedded Motoko in template literals. Requires the [`prettier-plugin-motoko`](https://github.com/caffeinelabs/prettier-plugin-motoko#readme) plugin.
|
|
617
|
+
|
|
618
|
+
##### `embeddedMotokoTags`
|
|
619
|
+
|
|
620
|
+
- **Type**: `string[]`
|
|
621
|
+
- **Default**: [`["motoko", "mo"]`](./src/embedded/motoko/options.ts)
|
|
622
|
+
- **Description**: Tags that identify embedded Motoko in template literals. Requires the [`prettier-plugin-motoko`](https://github.com/caffeinelabs/prettier-plugin-motoko#readme) plugin.
|
|
623
|
+
|
|
624
|
+
Formatting embedded Motoko requires the [`prettier-plugin-motoko`](https://github.com/caffeinelabs/prettier-plugin-motoko#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
625
|
+
|
|
626
|
+
#### Mustache
|
|
627
|
+
|
|
628
|
+
##### `embeddedMustacheComments`
|
|
629
|
+
|
|
630
|
+
- **Type**: `string[]`
|
|
631
|
+
- **Default**: [`["mustache"]`](./src/embedded/mustache/options.ts)
|
|
632
|
+
- **Description**: Block comments that identify embedded Mustache in template literals. Requires the [`prettier-plugin-mustache`](https://github.com/Poliklot/prettier-plugin-mustache#readme) plugin.
|
|
633
|
+
|
|
634
|
+
##### `embeddedMustacheTags`
|
|
635
|
+
|
|
636
|
+
- **Type**: `string[]`
|
|
637
|
+
- **Default**: [`["mustache"]`](./src/embedded/mustache/options.ts)
|
|
638
|
+
- **Description**: Tags that identify embedded Mustache in template literals. Requires the [`prettier-plugin-mustache`](https://github.com/Poliklot/prettier-plugin-mustache#readme) plugin.
|
|
639
|
+
|
|
640
|
+
Formatting embedded Mustache requires the [`prettier-plugin-mustache`](https://github.com/Poliklot/prettier-plugin-mustache#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
641
|
+
|
|
429
642
|
#### NGINX
|
|
430
643
|
|
|
431
644
|
##### `embeddedNginxComments`
|
|
432
645
|
|
|
433
646
|
- **Type**: `string[]`
|
|
434
647
|
- **Default**: [`["nginx"]`](./src/embedded/nginx/options.ts)
|
|
435
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin.
|
|
648
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded NGINX language. This option requires the [`prettier-plugin-nginx`](https://github.com/jxddk/prettier-plugin-nginx#readme) plugin.
|
|
436
649
|
|
|
437
650
|
##### `embeddedNginxTags`
|
|
438
651
|
|
|
439
652
|
- **Type**: `string[]`
|
|
440
653
|
- **Default**: [`["nginx"]`](./src/embedded/nginx/options.ts)
|
|
441
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin.
|
|
654
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded NGINX language. This option requires the [`prettier-plugin-nginx`](https://github.com/jxddk/prettier-plugin-nginx#readme) plugin.
|
|
655
|
+
|
|
656
|
+
Formatting embedded NGINX language requires the [`prettier-plugin-nginx`](https://github.com/jxddk/prettier-plugin-nginx#readme) plugin to be loaded as well. And [options](https://github.com/jxddk/prettier-plugin-nginx?tab=readme-ov-file#configuration) supported by `prettier-plugin-nginx` can therefore be used to further control the formatting behavior.
|
|
657
|
+
|
|
658
|
+
#### Nunjucks
|
|
442
659
|
|
|
443
|
-
|
|
660
|
+
##### `embeddedNunjucksComments`
|
|
661
|
+
|
|
662
|
+
- **Type**: `string[]`
|
|
663
|
+
- **Default**: [`["nunjucks", "njk"]`](./src/embedded/nunjucks/options.ts)
|
|
664
|
+
- **Description**: Block comments that identify embedded Nunjucks in template literals. Requires the [`prettier-plugin-nunjucks`](https://github.com/Poliklot/prettier-plugin-nunjucks#readme) plugin.
|
|
665
|
+
|
|
666
|
+
##### `embeddedNunjucksTags`
|
|
667
|
+
|
|
668
|
+
- **Type**: `string[]`
|
|
669
|
+
- **Default**: [`["nunjucks", "njk"]`](./src/embedded/nunjucks/options.ts)
|
|
670
|
+
- **Description**: Tags that identify embedded Nunjucks in template literals. Requires the [`prettier-plugin-nunjucks`](https://github.com/Poliklot/prettier-plugin-nunjucks#readme) plugin.
|
|
671
|
+
|
|
672
|
+
Formatting embedded Nunjucks requires the [`prettier-plugin-nunjucks`](https://github.com/Poliklot/prettier-plugin-nunjucks#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
444
673
|
|
|
445
674
|
#### Pegjs
|
|
446
675
|
|
|
@@ -448,15 +677,15 @@ Formatting embedded NGINX language requires the [`prettier-plugin-nginx`](https:
|
|
|
448
677
|
|
|
449
678
|
- **Type**: `string[]`
|
|
450
679
|
- **Default**: [`["pegjs", "peggy", "peg"]`](./src/embedded/pegjs/options.ts)
|
|
451
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin.
|
|
680
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded Pegjs language. This option requires the [`prettier-plugin-pegjs`](https://github.com/siefkenj/prettier-plugin-pegjs#readme) plugin.
|
|
452
681
|
|
|
453
682
|
##### `embeddedPegjsTags`
|
|
454
683
|
|
|
455
684
|
- **Type**: `string[]`
|
|
456
685
|
- **Default**: [`["pegjs", "peggy", "peg"]`](./src/embedded/pegjs/options.ts)
|
|
457
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded Pegjs language. This option requires the `prettier-plugin-pegjs` plugin.
|
|
686
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded Pegjs language. This option requires the [`prettier-plugin-pegjs`](https://github.com/siefkenj/prettier-plugin-pegjs#readme) plugin.
|
|
458
687
|
|
|
459
|
-
Formatting embedded Pegjs language requires the [`prettier-plugin-pegjs`](https://github.com/siefkenj/prettier-plugin-pegjs) plugin to be loaded as well. And [options](https://github.com/siefkenj/prettier-plugin-pegjs?tab=readme-ov-file#options) supported by `prettier-plugin-pegjs` can therefore be used to further control the formatting behavior.
|
|
688
|
+
Formatting embedded Pegjs language requires the [`prettier-plugin-pegjs`](https://github.com/siefkenj/prettier-plugin-pegjs#readme) plugin to be loaded as well. And [options](https://github.com/siefkenj/prettier-plugin-pegjs?tab=readme-ov-file#options) supported by `prettier-plugin-pegjs` can therefore be used to further control the formatting behavior.
|
|
460
689
|
|
|
461
690
|
Note that `prettier-plugin-pegjs` supports different parsers for the action blocks and they are specified by the [`actionParser` option](https://github.com/siefkenj/prettier-plugin-pegjs?tab=readme-ov-file#options). If you want to specify different action parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).
|
|
462
691
|
|
|
@@ -466,15 +695,31 @@ Note that `prettier-plugin-pegjs` supports different parsers for the action bloc
|
|
|
466
695
|
|
|
467
696
|
- **Type**: `string[]`
|
|
468
697
|
- **Default**: [`["php", "php5"]`](./src/embedded/php/options.ts)
|
|
469
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin.
|
|
698
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded PHP language. This option requires the [`@prettier/plugin-php`](https://github.com/prettier/plugin-php#readme) plugin.
|
|
470
699
|
|
|
471
700
|
##### `embeddedPhpTags`
|
|
472
701
|
|
|
473
702
|
- **Type**: `string[]`
|
|
474
703
|
- **Default**: [`["php", "php5"]`](./src/embedded/php/options.ts)
|
|
475
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded PHP language. This option requires the `@prettier/plugin-php` plugin.
|
|
704
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded PHP language. This option requires the [`@prettier/plugin-php`](https://github.com/prettier/plugin-php#readme) plugin.
|
|
705
|
+
|
|
706
|
+
Formatting embedded PHP language requires the [`@prettier/plugin-php`](https://github.com/prettier/plugin-php#readme) plugin to be loaded as well. And [options](https://github.com/prettier/plugin-php#configuration) supported by `@prettier/plugin-php` can therefore be used to further control the formatting behavior.
|
|
707
|
+
|
|
708
|
+
#### PowerShell
|
|
709
|
+
|
|
710
|
+
##### `embeddedPowerShellComments`
|
|
476
711
|
|
|
477
|
-
|
|
712
|
+
- **Type**: `string[]`
|
|
713
|
+
- **Default**: [`["powershell", "ps1"]`](./src/embedded/powershell/options.ts)
|
|
714
|
+
- **Description**: Block comments that identify embedded PowerShell in template literals. Requires the [`prettier-plugin-powershell`](https://github.com/Nick2bad4u/Prettier-Plugin-Powershell#readme) plugin.
|
|
715
|
+
|
|
716
|
+
##### `embeddedPowerShellTags`
|
|
717
|
+
|
|
718
|
+
- **Type**: `string[]`
|
|
719
|
+
- **Default**: [`["powershell", "ps1"]`](./src/embedded/powershell/options.ts)
|
|
720
|
+
- **Description**: Tags that identify embedded PowerShell in template literals. Requires the [`prettier-plugin-powershell`](https://github.com/Nick2bad4u/Prettier-Plugin-Powershell#readme) plugin.
|
|
721
|
+
|
|
722
|
+
Formatting embedded PowerShell requires the [`prettier-plugin-powershell`](https://github.com/Nick2bad4u/Prettier-Plugin-Powershell#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
478
723
|
|
|
479
724
|
#### Prisma
|
|
480
725
|
|
|
@@ -482,15 +727,15 @@ Formatting embedded PHP language requires the [`@prettier/plugin-php`](https://g
|
|
|
482
727
|
|
|
483
728
|
- **Type**: `string[]`
|
|
484
729
|
- **Default**: [`["prisma"]`](./src/embedded/prisma/options.ts)
|
|
485
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin.
|
|
730
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded Prisma language. This option requires the [`prettier-plugin-prisma`](https://github.com/avocadowastaken/prettier-plugin-prisma#readme) plugin.
|
|
486
731
|
|
|
487
732
|
##### `embeddedPrismaTags`
|
|
488
733
|
|
|
489
734
|
- **Type**: `string[]`
|
|
490
735
|
- **Default**: [`["prisma"]`](./src/embedded/prisma/options.ts)
|
|
491
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded Prisma language. This option requires the `prettier-plugin-prisma` plugin.
|
|
736
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded Prisma language. This option requires the [`prettier-plugin-prisma`](https://github.com/avocadowastaken/prettier-plugin-prisma#readme) plugin.
|
|
492
737
|
|
|
493
|
-
Formatting embedded Prisma language requires the [`prettier-plugin-prisma`](https://github.com/avocadowastaken/prettier-plugin-prisma) plugin to be loaded as well.
|
|
738
|
+
Formatting embedded Prisma language requires the [`prettier-plugin-prisma`](https://github.com/avocadowastaken/prettier-plugin-prisma#readme) plugin to be loaded as well.
|
|
494
739
|
|
|
495
740
|
#### Properties
|
|
496
741
|
|
|
@@ -498,15 +743,15 @@ Formatting embedded Prisma language requires the [`prettier-plugin-prisma`](http
|
|
|
498
743
|
|
|
499
744
|
- **Type**: `string[]`
|
|
500
745
|
- **Default**: [`["properties"]`](./src/embedded/properties/options.ts)
|
|
501
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin.
|
|
746
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded Properties language. This option requires the [`prettier-plugin-properties`](https://github.com/eemeli/prettier-plugin-properties#readme) plugin.
|
|
502
747
|
|
|
503
748
|
##### `embeddedPropertiesTags`
|
|
504
749
|
|
|
505
750
|
- **Type**: `string[]`
|
|
506
751
|
- **Default**: [`["properties"]`](./src/embedded/properties/options.ts)
|
|
507
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded Properties language. This option requires the `prettier-plugin-properties` plugin.
|
|
752
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded Properties language. This option requires the [`prettier-plugin-properties`](https://github.com/eemeli/prettier-plugin-properties#readme) plugin.
|
|
508
753
|
|
|
509
|
-
Formatting embedded Properties language requires the [`prettier-plugin-properties`](https://github.com/eemeli/prettier-plugin-properties) plugin to be loaded as well. And [options](https://github.com/eemeli/prettier-plugin-properties#configuration) supported by `prettier-plugin-properties` can therefore be used to further control the formatting behavior.
|
|
754
|
+
Formatting embedded Properties language requires the [`prettier-plugin-properties`](https://github.com/eemeli/prettier-plugin-properties#readme) plugin to be loaded as well. And [options](https://github.com/eemeli/prettier-plugin-properties#configuration) supported by `prettier-plugin-properties` can therefore be used to further control the formatting behavior.
|
|
510
755
|
|
|
511
756
|
#### Pug
|
|
512
757
|
|
|
@@ -514,15 +759,15 @@ Formatting embedded Properties language requires the [`prettier-plugin-propertie
|
|
|
514
759
|
|
|
515
760
|
- **Type**: `string[]`
|
|
516
761
|
- **Default**: [`["pug", "jade"]`](./src/embedded/pug/options.ts)
|
|
517
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin.
|
|
762
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded Pug language. This option requires the [`@prettier/plugin-pug`](https://github.com/prettier/plugin-pug#readme) plugin.
|
|
518
763
|
|
|
519
764
|
##### `embeddedPugTags`
|
|
520
765
|
|
|
521
766
|
- **Type**: `string[]`
|
|
522
767
|
- **Default**: [`["pug", "jade"]`](./src/embedded/pug/options.ts)
|
|
523
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin.
|
|
768
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded Pug language. This option requires the [`@prettier/plugin-pug`](https://github.com/prettier/plugin-pug#readme) plugin.
|
|
524
769
|
|
|
525
|
-
Formatting embedded Pug language requires the [`@prettier/plugin-pug`](https://github.com/prettier/plugin-pug) plugin to be loaded as well. And [options](https://github.com/prettier/plugin-pug?tab=readme-ov-file#configuration) supported by `@prettier/plugin-pug` can therefore be used to further control the formatting behavior.
|
|
770
|
+
Formatting embedded Pug language requires the [`@prettier/plugin-pug`](https://github.com/prettier/plugin-pug#readme) plugin to be loaded as well. And [options](https://github.com/prettier/plugin-pug?tab=readme-ov-file#configuration) supported by `@prettier/plugin-pug` can therefore be used to further control the formatting behavior.
|
|
526
771
|
|
|
527
772
|
#### Ruby
|
|
528
773
|
|
|
@@ -530,21 +775,21 @@ Formatting embedded Pug language requires the [`@prettier/plugin-pug`](https://g
|
|
|
530
775
|
|
|
531
776
|
- **Type**: `string[]`
|
|
532
777
|
- **Default**: [`["ruby"]`](./src/embedded/ruby/options.ts)
|
|
533
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.
|
|
778
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded Ruby language. This option requires the [`@prettier/plugin-ruby`](https://github.com/prettier/plugin-ruby#readme) plugin.
|
|
534
779
|
|
|
535
780
|
##### `embeddedRubyTags`
|
|
536
781
|
|
|
537
782
|
- **Type**: `string[]`
|
|
538
783
|
- **Default**: [`["ruby"]`](./src/embedded/ruby/options.ts)
|
|
539
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.
|
|
784
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded Ruby language. This option requires the [`@prettier/plugin-ruby`](https://github.com/prettier/plugin-ruby#readme) plugin.
|
|
540
785
|
|
|
541
786
|
##### `embeddedRubyParser`
|
|
542
787
|
|
|
543
788
|
- **Type**: [`"ruby" | "rbs" | "haml"`](./src/embedded/ruby/options.ts)
|
|
544
789
|
- **Default**: [`"ruby"`](./src/embedded/ruby/options.ts)
|
|
545
|
-
- **Description**: The parser used to parse the embedded Ruby language. This option requires the `@prettier/plugin-ruby` plugin.
|
|
790
|
+
- **Description**: The parser used to parse the embedded Ruby language. This option requires the [`@prettier/plugin-ruby`](https://github.com/prettier/plugin-ruby#readme) plugin.
|
|
546
791
|
|
|
547
|
-
Formatting embedded Ruby language requires the [`@prettier/plugin-ruby`](https://github.com/prettier/plugin-ruby) to be loaded and [its dependencies to be installed](https://github.com/prettier/plugin-ruby#getting-started) as well. And [options](https://github.com/prettier/plugin-ruby#configuration) supported by `@prettier/plugin-ruby` can therefore be used to further control the formatting behavior.
|
|
792
|
+
Formatting embedded Ruby language requires the [`@prettier/plugin-ruby`](https://github.com/prettier/plugin-ruby#readme) to be loaded and [its dependencies to be installed](https://github.com/prettier/plugin-ruby#getting-started) as well. And [options](https://github.com/prettier/plugin-ruby#configuration) supported by `@prettier/plugin-ruby` can therefore be used to further control the formatting behavior.
|
|
548
793
|
|
|
549
794
|
If you want to specify different parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).
|
|
550
795
|
|
|
@@ -554,37 +799,61 @@ If you want to specify different parsers for different comments or tags, check [
|
|
|
554
799
|
|
|
555
800
|
- **Type**: `string[]`
|
|
556
801
|
- **Default**: [`["sh"]`](./src/embedded/sh/options.ts)
|
|
557
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin.
|
|
802
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded Shell language. This option requires the [`prettier-plugin-sh`](https://github.com/un-ts/prettier/tree/master/packages/sh#readme) plugin.
|
|
558
803
|
|
|
559
804
|
##### `embeddedShTags`
|
|
560
805
|
|
|
561
806
|
- **Type**: `string[]`
|
|
562
807
|
- **Default**: [`["sh"]`](./src/embedded/sh/options.ts)
|
|
563
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded Shell language. This option requires the `prettier-plugin-sh` plugin.
|
|
808
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded Shell language. This option requires the [`prettier-plugin-sh`](https://github.com/un-ts/prettier/tree/master/packages/sh#readme) plugin.
|
|
564
809
|
|
|
565
810
|
Formatting embedded Shell language requires the [`prettier-plugin-sh`](https://github.com/un-ts/prettier/tree/master/packages/sh#readme) plugin to be loaded as well. And [options](https://github.com/un-ts/prettier/tree/master/packages/sh#parser-options) supported by `prettier-plugin-sh` can therefore be used to further control the formatting behavior.
|
|
566
811
|
|
|
567
812
|
Note that `prettier-plugin-sh` supports different variants of shell syntaxes and they are specified by the [`variant` option](https://github.com/un-ts/prettier/tree/master/packages/sh#parser-options). If you want to specify different variants for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).
|
|
568
813
|
|
|
814
|
+
#### Solidity
|
|
815
|
+
|
|
816
|
+
##### `embeddedSolidityComments`
|
|
817
|
+
|
|
818
|
+
- **Type**: `string[]`
|
|
819
|
+
- **Default**: [`["solidity", "sol"]`](./src/embedded/solidity/options.ts)
|
|
820
|
+
- **Description**: Block comments that identify embedded Solidity in template literals. Requires the [`prettier-plugin-solidity`](https://github.com/prettier-solidity/prettier-plugin-solidity#readme) plugin.
|
|
821
|
+
|
|
822
|
+
##### `embeddedSolidityTags`
|
|
823
|
+
|
|
824
|
+
- **Type**: `string[]`
|
|
825
|
+
- **Default**: [`["solidity", "sol"]`](./src/embedded/solidity/options.ts)
|
|
826
|
+
- **Description**: Tags that identify embedded Solidity in template literals. Requires the [`prettier-plugin-solidity`](https://github.com/prettier-solidity/prettier-plugin-solidity#readme) plugin.
|
|
827
|
+
|
|
828
|
+
##### `embeddedSolidityParser`
|
|
829
|
+
|
|
830
|
+
- **Type**: [`"slang" | "antlr" | "solidity-parse"`](./src/embedded/solidity/options.ts)
|
|
831
|
+
- **Default**: [`"slang"`](./src/embedded/solidity/options.ts)
|
|
832
|
+
- **Description**: The parser used to format embedded Solidity.
|
|
833
|
+
|
|
834
|
+
Formatting embedded Solidity requires the [`prettier-plugin-solidity`](https://github.com/prettier-solidity/prettier-plugin-solidity#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
835
|
+
|
|
836
|
+
Choose `"slang"` or `"antlr"` with current formatter versions. Formatter versions exposing `"solidity-parse"` use `embeddedSolidityParser: "solidity-parse"`.
|
|
837
|
+
|
|
569
838
|
#### SQL
|
|
570
839
|
|
|
571
840
|
##### `embeddedSqlComments`
|
|
572
841
|
|
|
573
842
|
- **Type**: `string[]`
|
|
574
843
|
- **Default**: [`["sql"]`](./src/embedded/sql/options.ts)
|
|
575
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.
|
|
844
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded SQL language. This option requires the [`prettier-plugin-sql`](https://github.com/un-ts/prettier/tree/master/packages/sql#readme) plugin or the [`prettier-plugin-sql-cst`](https://github.com/nene/prettier-plugin-sql-cst#readme) plugin.
|
|
576
845
|
|
|
577
846
|
##### `embeddedSqlTags`
|
|
578
847
|
|
|
579
848
|
- **Type**: `string[]`
|
|
580
849
|
- **Default**: [`["sql"]`](./src/embedded/sql/options.ts)
|
|
581
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.
|
|
850
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded SQL language. This option requires the [`prettier-plugin-sql`](https://github.com/un-ts/prettier/tree/master/packages/sql#readme) plugin or the [`prettier-plugin-sql-cst`](https://github.com/nene/prettier-plugin-sql-cst#readme) plugin.
|
|
582
851
|
|
|
583
852
|
##### `embeddedSqlPlugin`
|
|
584
853
|
|
|
585
854
|
- **Type**: [`"prettier-plugin-sql" | "prettier-plugin-sql-cst"`](./src/embedded/sql/options.ts)
|
|
586
855
|
- **Default**: [`"prettier-plugin-sql"`](./src/embedded/sql/options.ts)
|
|
587
|
-
- **Description**: The plugin used to format the embedded SQL language. This option requires the `prettier-plugin-sql` plugin or the `prettier-plugin-sql-cst` plugin.
|
|
856
|
+
- **Description**: The plugin used to format the embedded SQL language. This option requires the [`prettier-plugin-sql`](https://github.com/un-ts/prettier/tree/master/packages/sql#readme) plugin or the [`prettier-plugin-sql-cst`](https://github.com/nene/prettier-plugin-sql-cst#readme) plugin.
|
|
588
857
|
|
|
589
858
|
##### `embeddedSqlParser`
|
|
590
859
|
|
|
@@ -592,23 +861,41 @@ Note that `prettier-plugin-sh` supports different variants of shell syntaxes and
|
|
|
592
861
|
- **Default**: [`"sqlite"`](./src/embedded/sql/options.ts)
|
|
593
862
|
- **Description**: Specify the embedded SQL language parser. This option is only needed with the `prettier-plugin-sql-cst` plugin.
|
|
594
863
|
|
|
595
|
-
Formatting embedded SQL language requires the [`prettier-plugin-sql`](https://github.com/un-ts/prettier/tree/master/packages/sql#readme) plugin or the [`prettier-plugin-sql-cst`](https://github.com/nene/prettier-plugin-sql-cst) plugin to be loaded as well. And [options](https://github.com/un-ts/prettier/tree/master/packages/sql#parser-options) supported by `prettier-plugin-sql`, or [options](https://github.com/nene/prettier-plugin-sql-cst?tab=readme-ov-file#configuration) supported by `prettier-plugin-sql-cst` can therefore be used to further control the formatting behavior.
|
|
864
|
+
Formatting embedded SQL language requires the [`prettier-plugin-sql`](https://github.com/un-ts/prettier/tree/master/packages/sql#readme) plugin or the [`prettier-plugin-sql-cst`](https://github.com/nene/prettier-plugin-sql-cst#readme) plugin to be loaded as well. And [options](https://github.com/un-ts/prettier/tree/master/packages/sql#parser-options) supported by `prettier-plugin-sql`, or [options](https://github.com/nene/prettier-plugin-sql-cst?tab=readme-ov-file#configuration) supported by `prettier-plugin-sql-cst` can therefore be used to further control the formatting behavior.
|
|
596
865
|
|
|
597
866
|
Note that `prettier-plugin-sql` supports many different SQL dialects which are specified by the [`language`, `database` or `dialect` option](https://github.com/un-ts/prettier/tree/master/packages/sql#parser-options). And `prettier-plugin-sql-cst` also supports various parsers as shown above. If you want to specify different dialects or parsers for different comments or tags, check [`embeddedOverrides`](#embeddedoverrides-1).
|
|
598
867
|
|
|
868
|
+
#### Svelte
|
|
869
|
+
|
|
870
|
+
##### `embeddedSvelteComments`
|
|
871
|
+
|
|
872
|
+
- **Type**: `string[]`
|
|
873
|
+
- **Default**: [`["svelte"]`](./src/embedded/svelte/options.ts)
|
|
874
|
+
- **Description**: Block comments that identify embedded Svelte in template literals. Requires the [`prettier-plugin-svelte`](https://github.com/sveltejs/prettier-plugin-svelte#readme) plugin.
|
|
875
|
+
|
|
876
|
+
##### `embeddedSvelteTags`
|
|
877
|
+
|
|
878
|
+
- **Type**: `string[]`
|
|
879
|
+
- **Default**: [`["svelte"]`](./src/embedded/svelte/options.ts)
|
|
880
|
+
- **Description**: Tags that identify embedded Svelte in template literals. Requires the [`prettier-plugin-svelte`](https://github.com/sveltejs/prettier-plugin-svelte#readme) plugin.
|
|
881
|
+
|
|
882
|
+
Formatting embedded Svelte requires the [`prettier-plugin-svelte`](https://github.com/sveltejs/prettier-plugin-svelte#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
883
|
+
|
|
884
|
+
Supply the `svelte` compiler alongside the formatter plugin, using versions compatible with the project's Svelte version.
|
|
885
|
+
|
|
599
886
|
#### TOML
|
|
600
887
|
|
|
601
888
|
##### `embeddedTomlComments`
|
|
602
889
|
|
|
603
890
|
- **Type**: `string[]`
|
|
604
891
|
- **Default**: [`["toml"]`](./src/embedded/toml/options.ts)
|
|
605
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin.
|
|
892
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded TOML language. This option requires the [`prettier-plugin-toml`](https://github.com/un-ts/prettier/tree/master/packages/toml#readme) plugin.
|
|
606
893
|
|
|
607
894
|
##### `embeddedTomlTags`
|
|
608
895
|
|
|
609
896
|
- **Type**: `string[]`
|
|
610
897
|
- **Default**: [`["toml"]`](./src/embedded/toml/options.ts)
|
|
611
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin.
|
|
898
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded TOML language. This option requires the [`prettier-plugin-toml`](https://github.com/un-ts/prettier/tree/master/packages/toml#readme) plugin.
|
|
612
899
|
|
|
613
900
|
Formatting embedded TOML language requires the [`prettier-plugin-toml`](https://github.com/un-ts/prettier/tree/master/packages/toml#readme) plugin to be loaded as well. And [options](https://github.com/un-ts/prettier/blob/master/packages/toml/src/options.ts) supported by `prettier-plugin-toml` can therefore be used to further control the formatting behavior.
|
|
614
901
|
|
|
@@ -642,15 +929,39 @@ If you want to specify different parsers for different comments or tags, check [
|
|
|
642
929
|
|
|
643
930
|
- **Type**: `string[]`
|
|
644
931
|
- **Default**: [`["xml", "opml", "rss", "svg"]`](./src/embedded/xml/options.ts)
|
|
645
|
-
- **Description**: Block comments that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin.
|
|
932
|
+
- **Description**: Block comments that make their subsequent template literals be identified as embedded XML language. This option requires the [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml#readme) plugin.
|
|
646
933
|
|
|
647
934
|
##### `embeddedXmlTags`
|
|
648
935
|
|
|
649
936
|
- **Type**: `string[]`
|
|
650
937
|
- **Default**: [`["xml", "opml", "rss", "svg"]`](./src/embedded/xml/options.ts)
|
|
651
|
-
- **Description**: Tags that make their subsequent template literals be identified as embedded XML language. This option requires the `@prettier/plugin-xml` plugin.
|
|
938
|
+
- **Description**: Tags that make their subsequent template literals be identified as embedded XML language. This option requires the [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml#readme) plugin.
|
|
939
|
+
|
|
940
|
+
Embedded XML uses the parser provided by [`@prettier/plugin-xml`](https://github.com/prettier/plugin-xml#readme), which must be loaded when XML formatting is enabled. Its [options](https://github.com/prettier/plugin-xml#configuration) control the XML formatting behavior.
|
|
941
|
+
|
|
942
|
+
#### XQuery
|
|
943
|
+
|
|
944
|
+
##### `embeddedXQueryComments`
|
|
945
|
+
|
|
946
|
+
- **Type**: `string[]`
|
|
947
|
+
- **Default**: [`["xquery", "xq"]`](./src/embedded/xquery/options.ts)
|
|
948
|
+
- **Description**: Block comments that identify embedded XQuery in template literals. Requires the [`prettier-plugin-xquery`](https://github.com/DrRataplan/prettier-plugin-xquery#readme) plugin.
|
|
949
|
+
|
|
950
|
+
##### `embeddedXQueryTags`
|
|
951
|
+
|
|
952
|
+
- **Type**: `string[]`
|
|
953
|
+
- **Default**: [`["xquery", "xq"]`](./src/embedded/xquery/options.ts)
|
|
954
|
+
- **Description**: Tags that identify embedded XQuery in template literals. Requires the [`prettier-plugin-xquery`](https://github.com/DrRataplan/prettier-plugin-xquery#readme) plugin.
|
|
955
|
+
|
|
956
|
+
##### `embeddedXQueryParser`
|
|
957
|
+
|
|
958
|
+
- **Type**: [`"xquery" | "xquery4"`](./src/embedded/xquery/options.ts)
|
|
959
|
+
- **Default**: [`"xquery"`](./src/embedded/xquery/options.ts)
|
|
960
|
+
- **Description**: The parser used to format embedded XQuery.
|
|
961
|
+
|
|
962
|
+
Formatting embedded XQuery requires the [`prettier-plugin-xquery`](https://github.com/DrRataplan/prettier-plugin-xquery#readme) plugin to be installed and loaded. Its options control the embedded formatting behavior.
|
|
652
963
|
|
|
653
|
-
|
|
964
|
+
The default `"xquery"` parser formats XQuery 3.1. Select `"xquery4"` for the XQuery 4 syntax supported by the installed formatter version.
|
|
654
965
|
|
|
655
966
|
#### YAML
|
|
656
967
|
|
|
@@ -698,7 +1009,7 @@ This option is provided for users to override certain options based on comments
|
|
|
698
1009
|
|
|
699
1010
|
TypeScript override files (`.ts`, `.mts` and `.cts`) are loaded with the active runtime's `import()`. Node.js with [native type stripping](https://nodejs.org/api/typescript.html) enabled can load erasable TypeScript, and Bun provides native TypeScript loading. The runtime determines module semantics: `.mts` uses ES modules, `.cts` uses CommonJS, and `.ts` follows the package's module type.
|
|
700
1011
|
|
|
701
|
-
Consumers can enable a compatible loader through Node.js startup options, such as `node --import tsx node_modules/prettier/bin/prettier.cjs . --write`. Override files are evaluated in workers, which inherit the runtime's startup preloads. Enable synchronous module hooks through a `--import` or `--require` preload so they are available in those workers. When the runtime reports unsupported module loading or TypeScript transformation, the plugin can use the consumer project's optional [`tsx`](https://github.com/privatenumber/tsx) 4.19+ installation as a fallback. This fallback uses Node.js's [`module.register()`](https://nodejs.org/api/module.html#moduleregisterspecifier-parenturl-options) API, introduced in Node.js 18.19 and 20.6. Configuration errors include their original diagnostics.
|
|
1012
|
+
Consumers can enable a compatible loader through Node.js startup options, such as `node --import tsx node_modules/prettier/bin/prettier.cjs . --write`. Override files are evaluated in workers, which inherit the runtime's startup preloads. Enable synchronous module hooks through a `--import` or `--require` preload so they are available in those workers. When the runtime reports unsupported module loading or TypeScript transformation, the plugin can use the consumer project's optional [`tsx`](https://github.com/privatenumber/tsx#readme) 4.19+ installation as a fallback. This fallback uses Node.js's [`module.register()`](https://nodejs.org/api/module.html#moduleregisterspecifier-parenturl-options) API, introduced in Node.js 18.19 and 20.6. Configuration errors include their original diagnostics.
|
|
702
1013
|
|
|
703
1014
|
The Prettier VS Code extension uses its bundled Node.js runtime; JavaScript override files provide the simplest editor setup.
|
|
704
1015
|
|