prettier-plugin-embed 0.4.8 → 0.4.9

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.
Files changed (67) hide show
  1. package/README.md +70 -5
  2. package/dist/embedded/css/options.d.ts +2 -8
  3. package/dist/embedded/es/options.d.ts +2 -8
  4. package/dist/embedded/glsl/options.d.ts +2 -8
  5. package/dist/embedded/graphql/options.d.ts +2 -8
  6. package/dist/embedded/html/options.d.ts +2 -8
  7. package/dist/embedded/index.d.ts +1 -1
  8. package/dist/embedded/ini/options.d.ts +2 -9
  9. package/dist/embedded/ini/plugin-ini-types.d.ts +3 -0
  10. package/dist/embedded/ini/plugin-ini.d.ts +6 -0
  11. package/dist/embedded/java/options.d.ts +2 -13
  12. package/dist/embedded/java/plugin-java-types.d.ts +7 -0
  13. package/dist/embedded/java/plugin-java.d.ts +6 -0
  14. package/dist/embedded/json/options.d.ts +2 -8
  15. package/dist/embedded/jsonata/options.d.ts +2 -8
  16. package/dist/embedded/latex/options.d.ts +2 -8
  17. package/dist/embedded/markdown/embedder.d.ts +1 -1
  18. package/dist/embedded/markdown/options.d.ts +2 -9
  19. package/dist/embedded/markdown/plugin-markdown-types.d.ts +3 -0
  20. package/dist/embedded/markdown/plugin-markdown.d.ts +6 -0
  21. package/dist/embedded/nginx/options.d.ts +3 -10
  22. package/dist/embedded/nginx/plugin-nginx-types.d.ts +4 -0
  23. package/dist/embedded/nginx/plugin-nginx.d.ts +6 -0
  24. package/dist/embedded/noop/options.d.ts +2 -2
  25. package/dist/embedded/pegjs/options.d.ts +2 -11
  26. package/dist/embedded/pegjs/plugin-pegjs-types.d.ts +5 -0
  27. package/dist/embedded/pegjs/plugin-pegjs.d.ts +6 -0
  28. package/dist/embedded/php/options.d.ts +2 -11
  29. package/dist/embedded/php/plugin-php-types.d.ts +5 -0
  30. package/dist/embedded/php/plugin-php.d.ts +6 -0
  31. package/dist/embedded/prisma/options.d.ts +2 -8
  32. package/dist/embedded/properties/options.d.ts +2 -10
  33. package/dist/embedded/properties/plugin-properties-types.d.ts +4 -0
  34. package/dist/embedded/properties/plugin-properties.d.ts +6 -0
  35. package/dist/embedded/pug/options.d.ts +2 -35
  36. package/dist/embedded/pug/plugin-pug-types.d.ts +29 -0
  37. package/dist/embedded/pug/plugin-pug.d.ts +6 -0
  38. package/dist/embedded/register.d.ts +7 -7
  39. package/dist/embedded/ruby/options.d.ts +3 -16
  40. package/dist/embedded/ruby/plugin-ruby-types.d.ts +6 -0
  41. package/dist/embedded/ruby/plugin-ruby.d.ts +6 -0
  42. package/dist/embedded/sh/options.d.ts +3 -10
  43. package/dist/embedded/sh/plugin-sh-types.d.ts +4 -0
  44. package/dist/embedded/sh/plugin-sh.d.ts +6 -0
  45. package/dist/embedded/sql/options.d.ts +4 -13
  46. package/dist/embedded/sql/plugin-sql-cst-types.d.ts +4 -0
  47. package/dist/embedded/sql/plugin-sql-cst.d.ts +6 -0
  48. package/dist/embedded/sql/plugin-sql-types.d.ts +4 -0
  49. package/dist/embedded/sql/plugin-sql.d.ts +6 -0
  50. package/dist/embedded/toml/options.d.ts +3 -10
  51. package/dist/embedded/toml/plugin-toml-types.d.ts +4 -0
  52. package/dist/embedded/toml/plugin-toml.d.ts +6 -0
  53. package/dist/embedded/ts/options.d.ts +2 -8
  54. package/dist/embedded/types.d.ts +1 -1
  55. package/dist/embedded/utils.d.ts +5 -2
  56. package/dist/embedded/xml/options.d.ts +2 -12
  57. package/dist/embedded/xml/parser.d.ts +1 -0
  58. package/dist/embedded/xml/plugin-xml-types.d.ts +6 -0
  59. package/dist/embedded/xml/plugin-xml.d.ts +6 -0
  60. package/dist/embedded/yaml/options.d.ts +2 -8
  61. package/dist/index.d.ts +7 -2
  62. package/dist/index.js +163 -168
  63. package/dist/options.d.ts +14 -18
  64. package/dist/plugin-embed.d.ts +6 -0
  65. package/dist/types.d.ts +5 -24
  66. package/dist/utils.d.ts +1 -4
  67. package/package.json +36 -9
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <div align="center">
2
2
 
3
- ![prettier-plugin-embed-light](./asset/prettier-plugin-embed-wide-light.svg)
3
+ ![prettier-plugin-embed-wide-logo](./asset/prettier-plugin-embed-wide-light.svg)
4
4
 
5
5
  # Prettier Plugin Embed
6
6
 
@@ -167,7 +167,7 @@ If you want to specify different parsers for different identifiers, check [`embe
167
167
  | `embeddedEsIdentifiers` | `string[]` | [`["js", "jsx", "es", "es6", "mjs", "cjs", "pac", "javascript"]`](./src/embedded/es/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded ECMAScript/JavaScript language. |
168
168
  | `embeddedEsParser` | [`"babel" \| "babel-flow" \| "acorn" \| "espree" \| "flow" \| "meriyah"`](./src/embedded/es/options.ts) | [`"babel"`](./src/embedded/es/options.ts) | The parser used to parse the embedded ECMASCript/JavaScript language. |
169
169
 
170
- Formatting embedded ECMAScript language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.
170
+ Formatting embedded ECMAScript/JavaScript language doesn't require other plugins and uses the parsers and printers provided by Prettier natively.
171
171
 
172
172
  If you want to specify different parsers for different identifiers, check [`embeddedOverrides`](#embeddedoverrides).
173
173
 
@@ -266,7 +266,7 @@ The `remark` parser is [an alias of the `markdown` parser](https://github.com/pr
266
266
  | :------------------------: | :--------: | :--------------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
267
267
  | `embeddedNginxIdentifiers` | `string[]` | [`["nginx"]`](./src/embedded/nginx/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded NGINX language. This option requires the `prettier-plugin-nginx` plugin. |
268
268
 
269
- Formatting embedded Pegjs language requires the [`prettier-plugin-nginx`](https://github.com/jxddk/prettier-plugin-nginx) 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.
269
+ Formatting embedded NGINX language requires the [`prettier-plugin-nginx`](https://github.com/jxddk/prettier-plugin-nginx) 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.
270
270
 
271
271
  #### Pegjs
272
272
 
@@ -308,7 +308,7 @@ Formatting embedded Properties language requires the [`prettier-plugin-propertie
308
308
  | :----------------------: | :--------: | :------------------------------------------------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
309
309
  | `embeddedPugIdentifiers` | `string[]` | [`["pug", "jade"]`](./src/embedded/pug/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded Pug language. This option requires the `@prettier/plugin-pug` plugin. |
310
310
 
311
- Formatting embedded Shell 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.
311
+ 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.
312
312
 
313
313
  #### Ruby
314
314
 
@@ -349,7 +349,7 @@ Note that `prettier-plugin-sql` supports many different SQL dialects which are s
349
349
  | :-----------------------: | :--------: | :------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
350
350
  | `embeddedTomlIdentifiers` | `string[]` | [`["toml"]`](./src/embedded/toml/options.ts) | Tag or comment identifiers that make their subsequent template literals be identified as embedded TOML language. This option requires the `prettier-plugin-toml` plugin. |
351
351
 
352
- 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 supported by `prettier-plugin-toml` can therefore be used to further control the formatting behavior.
352
+ 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.
353
353
 
354
354
  #### TS (TypeScript)
355
355
 
@@ -421,6 +421,71 @@ An example `.json` file is:
421
421
  >
422
422
  > Please note that not every option is supported to override. That largely depends on at which phase those options will kick in and take effect. For example, you can't override `tabWidth` in `embeddedOverrides` because this option is used in the [`printDocToString`](https://github.com/prettier/prettier/blob/7aecca5d6473d73f562ca3af874831315f8f2581/src/document/printer.js#L302) phase, where `prettier-plugin-embed` cannot override this option for only a set of specified identifiers. To find the list of unsupported options, please check the interface definition of `EmbeddedOverride` in the [source code](https://github.com/Sec-ant/prettier-plugin-embed/blob/main/src/types.ts).
423
423
 
424
+ ### Typed Options
425
+
426
+ There're several ways to use the typed options provided by this plugin. Taking the embedded SQL language as an example:
427
+
428
+ - **Augment the `Options` type from `Prettier` to use plugin-specific options**
429
+
430
+ Register options from `prettier-plugin-embed` (this plugin):
431
+
432
+ ```ts
433
+ /// <reference types="prettier-plugin-embed/plugin-embed" />
434
+ ```
435
+
436
+ Register options from `prettier-plugin-sql`:
437
+
438
+ ```ts
439
+ /// <reference types="prettier-plugin-embed/embedded/sql/plugin-sql" />
440
+ ```
441
+
442
+ Other embedded languages share the same pattern:
443
+
444
+ ```ts
445
+ /// <reference types="prettier-plugin-embed/embedded/<language>/<(no prettier or scope) plugin name>" />
446
+ ```
447
+
448
+ - **Import plugin-specific options**
449
+
450
+ Import options from `prettier-plugin-embed` (this plugin):
451
+
452
+ ```ts
453
+ import type { PluginEmbedOptions } from "prettier-plugin-embed";
454
+ ```
455
+
456
+ Import options from `prettier-plugin-sql`:
457
+
458
+ ```ts
459
+ import type { PluginSqlOptions } from "prettier-plugin-embed/embedded/sql/plugin-sql-types";
460
+ ```
461
+
462
+ **NOTE:** You can also import the types from the `prettier-plugin-sql` plugin directly. However, not all of the plugins provide types, or provide them in a predictable way, so this plugin exports them in a more unified manner.
463
+
464
+ Other embedded languages share the same pattern:
465
+
466
+ ```ts
467
+ import type { Plugin<Language>Options } from "prettier-plugin-embed/embedded/<language>/<(no prettier or scope) plugin name>-types";
468
+ ```
469
+
470
+ - **Use `JSDoc` in JavaScript files**
471
+
472
+ ```js
473
+ /**
474
+ * @type {import("prettier-plugin-embed").PluginEmbedOptions}
475
+ */
476
+ const pluginEmbedOptions = {
477
+ embeddedSqlIdentifiers: ["sql"],
478
+ };
479
+
480
+ /**
481
+ * @type {import("prettier-plugin-embed/embedded/sql/plugin-sql-types").PluginSqlOptions}
482
+ */
483
+ const pluginSqlOptions = {
484
+ language: "postgresql",
485
+ keywordCase: "upper",
486
+ };
487
+ ```
488
+
424
489
  ## Contributing
425
490
 
426
491
  Bug fixes, new language support and tests are welcome. Please have a look at the project structure before getting started. Feel free to leave questions or suggestions.
@@ -6,14 +6,12 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../u
6
6
  * - https://github.com/github-linguist/linguist/blob/7ca3799b8b5f1acde1dd7a8dfb7ae849d3dfb4cd/lib/linguist/languages.yml#L887
7
7
  */
8
8
  declare const DEFAULT_IDENTIFIERS: readonly ["css"];
9
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
9
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
10
10
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
11
11
  declare const CSS_PARSERS: readonly ["css", "less", "scss"];
12
12
  type CssParser = (typeof CSS_PARSERS)[number];
13
13
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedCssIdentifiers";
14
14
  declare const EMBEDDED_LANGUAGE_PARSER: "embeddedCssParser";
15
- export interface PrettierPluginDepsOptions {
16
- }
17
15
  export declare const options: {
18
16
  readonly embeddedCssIdentifiers: {
19
17
  readonly category: "Embed";
@@ -41,13 +39,9 @@ declare module "../types.js" {
41
39
  }
42
40
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
43
41
  }
44
- interface PrettierPluginEmbedOptions {
42
+ interface PluginEmbedOptions {
45
43
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
46
44
  [EMBEDDED_LANGUAGE_PARSER]?: CssParser;
47
45
  }
48
46
  }
49
- declare module "prettier" {
50
- interface Options extends PrettierPluginDepsOptions {
51
- }
52
- }
53
47
  export {};
@@ -6,14 +6,12 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../u
6
6
  * - https://github.com/github-linguist/linguist/blob/7ca3799b8b5f1acde1dd7a8dfb7ae849d3dfb4cd/lib/linguist/languages.yml#L3314
7
7
  */
8
8
  declare const DEFAULT_IDENTIFIERS: readonly ["js", "jsx", "es", "es6", "mjs", "cjs", "pac", "javascript"];
9
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
9
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
10
10
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
11
11
  declare const ES_PARSERS: readonly ["babel", "babel-flow", "acorn", "espree", "flow", "meriyah"];
12
12
  export type EsParser = (typeof ES_PARSERS)[number];
13
13
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedEsIdentifiers";
14
14
  declare const EMBEDDED_LANGUAGE_PARSER: "embeddedEsParser";
15
- export interface PrettierPluginDepsOptions {
16
- }
17
15
  export declare const options: {
18
16
  readonly embeddedEsIdentifiers: {
19
17
  readonly category: "Embed";
@@ -41,13 +39,9 @@ declare module "../types.js" {
41
39
  }
42
40
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
43
41
  }
44
- interface PrettierPluginEmbedOptions {
42
+ interface PluginEmbedOptions {
45
43
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
46
44
  [EMBEDDED_LANGUAGE_PARSER]?: EsParser;
47
45
  }
48
46
  }
49
- declare module "prettier" {
50
- interface Options extends PrettierPluginDepsOptions {
51
- }
52
- }
53
47
  export {};
@@ -6,11 +6,9 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../u
6
6
  * - https://github.com/github-linguist/linguist/blob/7ca3799b8b5f1acde1dd7a8dfb7ae849d3dfb4cd/lib/linguist/languages.yml#L2180
7
7
  */
8
8
  declare const DEFAULT_IDENTIFIERS: readonly ["glsl", "shader"];
9
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
9
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
10
10
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
11
11
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedGlslIdentifiers";
12
- export interface PrettierPluginDepsOptions {
13
- }
14
12
  export declare const options: {
15
13
  readonly embeddedGlslIdentifiers: {
16
14
  readonly category: "Embed";
@@ -28,12 +26,8 @@ declare module "../types.js" {
28
26
  }
29
27
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
30
28
  }
31
- interface PrettierPluginEmbedOptions {
29
+ interface PluginEmbedOptions {
32
30
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
33
31
  }
34
32
  }
35
- declare module "prettier" {
36
- interface Options extends PrettierPluginDepsOptions {
37
- }
38
- }
39
33
  export {};
@@ -5,11 +5,9 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../u
5
5
  * - https://github.com/github-linguist/linguist/blob/7ca3799b8b5f1acde1dd7a8dfb7ae849d3dfb4cd/lib/linguist/languages.yml#L2578
6
6
  */
7
7
  declare const DEFAULT_IDENTIFIERS: readonly ["graphql", "gql"];
8
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
8
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
9
9
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
10
10
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedGraphqlIdentifiers";
11
- export interface PrettierPluginDepsOptions {
12
- }
13
11
  export declare const options: {
14
12
  readonly embeddedGraphqlIdentifiers: {
15
13
  readonly category: "Embed";
@@ -27,12 +25,8 @@ declare module "../types.js" {
27
25
  }
28
26
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
29
27
  }
30
- interface PrettierPluginEmbedOptions {
28
+ interface PluginEmbedOptions {
31
29
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
32
30
  }
33
31
  }
34
- declare module "prettier" {
35
- interface Options extends PrettierPluginDepsOptions {
36
- }
37
- }
38
32
  export {};
@@ -6,14 +6,12 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../u
6
6
  * - https://github.com/github-linguist/linguist/blob/7ca3799b8b5f1acde1dd7a8dfb7ae849d3dfb4cd/lib/linguist/languages.yml#L2684
7
7
  */
8
8
  declare const DEFAULT_IDENTIFIERS: readonly ["html", "xhtml"];
9
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
9
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
10
10
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
11
11
  declare const HTML_PARSERS: readonly ["html", "vue", "angular", "lwc"];
12
12
  type HtmlParser = (typeof HTML_PARSERS)[number];
13
13
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedHtmlIdentifiers";
14
14
  declare const EMBEDDED_LANGUAGE_PARSER: "embeddedHtmlParser";
15
- export interface PrettierPluginDepsOptions {
16
- }
17
15
  export declare const options: {
18
16
  readonly embeddedHtmlIdentifiers: {
19
17
  readonly category: "Embed";
@@ -41,13 +39,9 @@ declare module "../types.js" {
41
39
  }
42
40
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
43
41
  }
44
- interface PrettierPluginEmbedOptions {
42
+ interface PluginEmbedOptions {
45
43
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
46
44
  [EMBEDDED_LANGUAGE_PARSER]?: HtmlParser;
47
45
  }
48
46
  }
49
- declare module "prettier" {
50
- interface Options extends PrettierPluginDepsOptions {
51
- }
52
- }
53
47
  export {};
@@ -1,3 +1,3 @@
1
1
  export * from "./register.js";
2
- export type { EmbeddedDefaultIdentifier, EmbeddedEmbedders, EmbeddedLanguage, EmbeddedOptions, EmbeddedParsers, PrettierPluginEmbedOptions, } from "./types.js";
2
+ export type { EmbeddedDefaultIdentifier, EmbeddedEmbedders, EmbeddedLanguage, EmbeddedOptions, EmbeddedParsers, PluginEmbedOptions, } from "./types.js";
3
3
  export { makeIdentifiersOptionName, type AutocompleteStringList, } from "./utils.js";
@@ -5,12 +5,9 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../u
5
5
  * - https://github.com/github-linguist/linguist/blob/7ca3799b8b5f1acde1dd7a8dfb7ae849d3dfb4cd/lib/linguist/languages.yml#L2928
6
6
  */
7
7
  declare const DEFAULT_IDENTIFIERS: readonly ["ini", "cfg", "pro"];
8
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
8
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
9
9
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
10
10
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedIniIdentifiers";
11
- export interface PrettierPluginDepsOptions {
12
- iniSpaceAroundEquals?: boolean;
13
- }
14
11
  export declare const options: {
15
12
  readonly embeddedIniIdentifiers: {
16
13
  readonly category: "Embed";
@@ -28,12 +25,8 @@ declare module "../types.js" {
28
25
  }
29
26
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
30
27
  }
31
- interface PrettierPluginEmbedOptions {
28
+ interface PluginEmbedOptions {
32
29
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
33
30
  }
34
31
  }
35
- declare module "prettier" {
36
- interface Options extends PrettierPluginDepsOptions {
37
- }
38
- }
39
32
  export {};
@@ -0,0 +1,3 @@
1
+ export interface PluginIniOptions {
2
+ iniSpaceAroundEquals?: boolean;
3
+ }
@@ -0,0 +1,6 @@
1
+ import "prettier";
2
+ import type { PluginIniOptions } from "./plugin-ini-types.js";
3
+
4
+ declare module "prettier" {
5
+ export interface Options extends PluginIniOptions {}
6
+ }
@@ -1,15 +1,8 @@
1
1
  import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
2
2
  declare const DEFAULT_IDENTIFIERS: readonly ["java"];
3
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
3
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
4
4
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
5
5
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedJavaIdentifiers";
6
- /**
7
- * Location:
8
- * https://github.com/jhipster/prettier-java/blob/983a09d890ae832565ceda1a28b3074e061e3cea/packages/prettier-plugin-java/src/options.js
9
- */
10
- export interface PrettierPluginDepsOptions {
11
- entrypoint?: "arrayInitializer" | "variableInitializerList" | "block" | "blockStatements" | "blockStatement" | "localVariableDeclarationStatement" | "localVariableDeclaration" | "localVariableType" | "statement" | "statementWithoutTrailingSubstatement" | "emptyStatement" | "labeledStatement" | "expressionStatement" | "statementExpression" | "ifStatement" | "assertStatement" | "switchStatement" | "switchBlock" | "switchBlockStatementGroup" | "switchLabel" | "switchRule" | "caseConstant" | "whileStatement" | "doStatement" | "forStatement" | "basicForStatement" | "forInit" | "forUpdate" | "statementExpressionList" | "enhancedForStatement" | "breakStatement" | "continueStatement" | "returnStatement" | "throwStatement" | "synchronizedStatement" | "tryStatement" | "catches" | "catchClause" | "catchFormalParameter" | "catchType" | "finally" | "tryWithResourcesStatement" | "resourceSpecification" | "resourceList" | "resource" | "yieldStatement" | "variableAccess" | "classDeclaration" | "normalClassDeclaration" | "classModifier" | "typeParameters" | "typeParameterList" | "superclass" | "superinterfaces" | "interfaceTypeList" | "classPermits" | "classBody" | "classBodyDeclaration" | "classMemberDeclaration" | "fieldDeclaration" | "fieldModifier" | "variableDeclaratorList" | "variableDeclarator" | "variableDeclaratorId" | "variableInitializer" | "unannType" | "unannPrimitiveTypeWithOptionalDimsSuffix" | "unannPrimitiveType" | "unannReferenceType" | "unannClassOrInterfaceType" | "unannClassType" | "unannInterfaceType" | "unannTypeVariable" | "methodDeclaration" | "methodModifier" | "methodHeader" | "result" | "methodDeclarator" | "receiverParameter" | "formalParameterList" | "formalParameter" | "variableParaRegularParameter" | "variableArityParameter" | "variableModifier" | "throws" | "exceptionTypeList" | "exceptionType" | "methodBody" | "instanceInitializer" | "staticInitializer" | "constructorDeclaration" | "constructorModifier" | "constructorDeclarator" | "simpleTypeName" | "constructorBody" | "explicitConstructorInvocation" | "unqualifiedExplicitConstructorInvocation" | "qualifiedExplicitConstructorInvocation" | "enumDeclaration" | "enumBody" | "enumConstantList" | "enumConstant" | "enumConstantModifier" | "enumBodyDeclarations" | "recordDeclaration" | "recordHeader" | "recordComponentList" | "recordComponent" | "variableArityRecordComponent" | "recordComponentModifier" | "recordBody" | "recordBodyDeclaration" | "compactConstructorDeclaration" | "isDims" | "expression" | "lambdaExpression" | "lambdaParameters" | "lambdaParametersWithBraces" | "lambdaParameterList" | "inferredLambdaParameterList" | "explicitLambdaParameterList" | "lambdaParameter" | "regularLambdaParameter" | "lambdaParameterType" | "lambdaBody" | "ternaryExpression" | "binaryExpression" | "unaryExpression" | "unaryExpressionNotPlusMinus" | "primary" | "primaryPrefix" | "primarySuffix" | "fqnOrRefType" | "fqnOrRefTypePartRest" | "fqnOrRefTypePartCommon" | "fqnOrRefTypePartFirst" | "parenthesisExpression" | "castExpression" | "primitiveCastExpression" | "referenceTypeCastExpression" | "newExpression" | "unqualifiedClassInstanceCreationExpression" | "classOrInterfaceTypeToInstantiate" | "typeArgumentsOrDiamond" | "diamond" | "methodInvocationSuffix" | "argumentList" | "arrayCreationExpression" | "arrayCreationDefaultInitSuffix" | "arrayCreationExplicitInitSuffix" | "dimExprs" | "dimExpr" | "classLiteralSuffix" | "arrayAccessSuffix" | "methodReferenceSuffix" | "pattern" | "typePattern" | "recordPattern" | "componentPatternList" | "componentPattern" | "unnamedPattern" | "guard" | "isRefTypeInMethodRef" | "interfaceDeclaration" | "normalInterfaceDeclaration" | "interfaceModifier" | "extendsInterfaces" | "interfacePermits" | "interfaceBody" | "interfaceMemberDeclaration" | "constantDeclaration" | "constantModifier" | "interfaceMethodDeclaration" | "interfaceMethodModifier" | "annotationTypeDeclaration" | "annotationTypeBody" | "annotationTypeMemberDeclaration" | "annotationTypeElementDeclaration" | "annotationTypeElementModifier" | "defaultValue" | "annotation" | "elementValuePairList" | "elementValuePair" | "elementValue" | "elementValueArrayInitializer" | "elementValueList" | "literal" | "integerLiteral" | "floatingPointLiteral" | "booleanLiteral" | "moduleName" | "packageName" | "typeName" | "expressionName" | "methodName" | "packageOrTypeName" | "ambiguousName" | "compilationUnit" | "ordinaryCompilationUnit" | "modularCompilationUnit" | "packageDeclaration" | "packageModifier" | "importDeclaration" | "typeDeclaration" | "moduleDeclaration" | "moduleDirective" | "requiresModuleDirective" | "exportsModuleDirective" | "opensModuleDirective" | "usesModuleDirective" | "providesModuleDirective" | "requiresModifier" | "primitiveType" | "numericType" | "integralType" | "floatingPointType" | "referenceType" | "classOrInterfaceType" | "classType" | "interfaceType" | "typeVariable" | "dims" | "typeParameter" | "typeParameterModifier" | "typeBound" | "additionalBound" | "typeArguments" | "typeArgumentList" | "typeArgument" | "wildcard" | "wildcardBounds";
12
- }
13
6
  export declare const options: {
14
7
  readonly embeddedJavaIdentifiers: {
15
8
  readonly category: "Embed";
@@ -27,12 +20,8 @@ declare module "../types.js" {
27
20
  }
28
21
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
29
22
  }
30
- interface PrettierPluginEmbedOptions {
23
+ interface PluginEmbedOptions {
31
24
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
32
25
  }
33
26
  }
34
- declare module "prettier" {
35
- interface Options extends PrettierPluginDepsOptions {
36
- }
37
- }
38
27
  export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Location:
3
+ * https://github.com/jhipster/prettier-java/blob/983a09d890ae832565ceda1a28b3074e061e3cea/packages/prettier-plugin-java/src/options.js
4
+ */
5
+ export interface PluginJavaOptions {
6
+ entrypoint?: "arrayInitializer" | "variableInitializerList" | "block" | "blockStatements" | "blockStatement" | "localVariableDeclarationStatement" | "localVariableDeclaration" | "localVariableType" | "statement" | "statementWithoutTrailingSubstatement" | "emptyStatement" | "labeledStatement" | "expressionStatement" | "statementExpression" | "ifStatement" | "assertStatement" | "switchStatement" | "switchBlock" | "switchBlockStatementGroup" | "switchLabel" | "switchRule" | "caseConstant" | "whileStatement" | "doStatement" | "forStatement" | "basicForStatement" | "forInit" | "forUpdate" | "statementExpressionList" | "enhancedForStatement" | "breakStatement" | "continueStatement" | "returnStatement" | "throwStatement" | "synchronizedStatement" | "tryStatement" | "catches" | "catchClause" | "catchFormalParameter" | "catchType" | "finally" | "tryWithResourcesStatement" | "resourceSpecification" | "resourceList" | "resource" | "yieldStatement" | "variableAccess" | "classDeclaration" | "normalClassDeclaration" | "classModifier" | "typeParameters" | "typeParameterList" | "superclass" | "superinterfaces" | "interfaceTypeList" | "classPermits" | "classBody" | "classBodyDeclaration" | "classMemberDeclaration" | "fieldDeclaration" | "fieldModifier" | "variableDeclaratorList" | "variableDeclarator" | "variableDeclaratorId" | "variableInitializer" | "unannType" | "unannPrimitiveTypeWithOptionalDimsSuffix" | "unannPrimitiveType" | "unannReferenceType" | "unannClassOrInterfaceType" | "unannClassType" | "unannInterfaceType" | "unannTypeVariable" | "methodDeclaration" | "methodModifier" | "methodHeader" | "result" | "methodDeclarator" | "receiverParameter" | "formalParameterList" | "formalParameter" | "variableParaRegularParameter" | "variableArityParameter" | "variableModifier" | "throws" | "exceptionTypeList" | "exceptionType" | "methodBody" | "instanceInitializer" | "staticInitializer" | "constructorDeclaration" | "constructorModifier" | "constructorDeclarator" | "simpleTypeName" | "constructorBody" | "explicitConstructorInvocation" | "unqualifiedExplicitConstructorInvocation" | "qualifiedExplicitConstructorInvocation" | "enumDeclaration" | "enumBody" | "enumConstantList" | "enumConstant" | "enumConstantModifier" | "enumBodyDeclarations" | "recordDeclaration" | "recordHeader" | "recordComponentList" | "recordComponent" | "variableArityRecordComponent" | "recordComponentModifier" | "recordBody" | "recordBodyDeclaration" | "compactConstructorDeclaration" | "isDims" | "expression" | "lambdaExpression" | "lambdaParameters" | "lambdaParametersWithBraces" | "lambdaParameterList" | "inferredLambdaParameterList" | "explicitLambdaParameterList" | "lambdaParameter" | "regularLambdaParameter" | "lambdaParameterType" | "lambdaBody" | "ternaryExpression" | "binaryExpression" | "unaryExpression" | "unaryExpressionNotPlusMinus" | "primary" | "primaryPrefix" | "primarySuffix" | "fqnOrRefType" | "fqnOrRefTypePartRest" | "fqnOrRefTypePartCommon" | "fqnOrRefTypePartFirst" | "parenthesisExpression" | "castExpression" | "primitiveCastExpression" | "referenceTypeCastExpression" | "newExpression" | "unqualifiedClassInstanceCreationExpression" | "classOrInterfaceTypeToInstantiate" | "typeArgumentsOrDiamond" | "diamond" | "methodInvocationSuffix" | "argumentList" | "arrayCreationExpression" | "arrayCreationDefaultInitSuffix" | "arrayCreationExplicitInitSuffix" | "dimExprs" | "dimExpr" | "classLiteralSuffix" | "arrayAccessSuffix" | "methodReferenceSuffix" | "pattern" | "typePattern" | "recordPattern" | "componentPatternList" | "componentPattern" | "unnamedPattern" | "guard" | "isRefTypeInMethodRef" | "interfaceDeclaration" | "normalInterfaceDeclaration" | "interfaceModifier" | "extendsInterfaces" | "interfacePermits" | "interfaceBody" | "interfaceMemberDeclaration" | "constantDeclaration" | "constantModifier" | "interfaceMethodDeclaration" | "interfaceMethodModifier" | "annotationTypeDeclaration" | "annotationTypeBody" | "annotationTypeMemberDeclaration" | "annotationTypeElementDeclaration" | "annotationTypeElementModifier" | "defaultValue" | "annotation" | "elementValuePairList" | "elementValuePair" | "elementValue" | "elementValueArrayInitializer" | "elementValueList" | "literal" | "integerLiteral" | "floatingPointLiteral" | "booleanLiteral" | "moduleName" | "packageName" | "typeName" | "expressionName" | "methodName" | "packageOrTypeName" | "ambiguousName" | "compilationUnit" | "ordinaryCompilationUnit" | "modularCompilationUnit" | "packageDeclaration" | "packageModifier" | "importDeclaration" | "typeDeclaration" | "moduleDeclaration" | "moduleDirective" | "requiresModuleDirective" | "exportsModuleDirective" | "opensModuleDirective" | "usesModuleDirective" | "providesModuleDirective" | "requiresModifier" | "primitiveType" | "numericType" | "integralType" | "floatingPointType" | "referenceType" | "classOrInterfaceType" | "classType" | "interfaceType" | "typeVariable" | "dims" | "typeParameter" | "typeParameterModifier" | "typeBound" | "additionalBound" | "typeArguments" | "typeArgumentList" | "typeArgument" | "wildcard" | "wildcardBounds";
7
+ }
@@ -0,0 +1,6 @@
1
+ import "prettier";
2
+ import type { PluginJavaOptions } from "./plugin-java-types.js";
3
+
4
+ declare module "prettier" {
5
+ interface Options extends PluginJavaOptions {}
6
+ }
@@ -5,14 +5,12 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../u
5
5
  * - https://github.com/github-linguist/linguist/blob/7ca3799b8b5f1acde1dd7a8dfb7ae849d3dfb4cd/lib/linguist/languages.yml#L3141
6
6
  */
7
7
  declare const DEFAULT_IDENTIFIERS: readonly ["json", "jsonl"];
8
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
8
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
9
9
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
10
10
  declare const JSON_PARSERS: readonly ["json", "json5", "jsonc", "json-stringify"];
11
11
  type JsonParser = (typeof JSON_PARSERS)[number];
12
12
  declare const EMBEDDED_LANGUAGE_PARSER: "embeddedJsonParser";
13
13
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedJsonIdentifiers";
14
- export interface PrettierPluginDepsOptions {
15
- }
16
14
  export declare const options: {
17
15
  readonly embeddedJsonIdentifiers: {
18
16
  readonly category: "Embed";
@@ -40,13 +38,9 @@ declare module "../types.js" {
40
38
  }
41
39
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
42
40
  }
43
- interface PrettierPluginEmbedOptions {
41
+ interface PluginEmbedOptions {
44
42
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
45
43
  [EMBEDDED_LANGUAGE_PARSER]?: JsonParser;
46
44
  }
47
45
  }
48
- declare module "prettier" {
49
- interface Options extends PrettierPluginDepsOptions {
50
- }
51
- }
52
46
  export {};
@@ -1,10 +1,8 @@
1
1
  import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
2
2
  declare const DEFAULT_IDENTIFIERS: readonly ["jsonata"];
3
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
3
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
4
4
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
5
5
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedJsonataIdentifiers";
6
- export interface PrettierPluginDepsOptions {
7
- }
8
6
  export declare const options: {
9
7
  readonly embeddedJsonataIdentifiers: {
10
8
  readonly category: "Embed";
@@ -22,12 +20,8 @@ declare module "../types.js" {
22
20
  }
23
21
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
24
22
  }
25
- interface PrettierPluginEmbedOptions {
23
+ interface PluginEmbedOptions {
26
24
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
27
25
  }
28
26
  }
29
- declare module "prettier" {
30
- interface Options extends PrettierPluginDepsOptions {
31
- }
32
- }
33
27
  export {};
@@ -5,11 +5,9 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../u
5
5
  * - https://github.com/github-linguist/linguist/blob/7ca3799b8b5f1acde1dd7a8dfb7ae849d3dfb4cd/lib/linguist/languages.yml#L6994
6
6
  */
7
7
  declare const DEFAULT_IDENTIFIERS: readonly ["latex", "tex", "aux", "cls", "bbl", "bib", "toc", "sty"];
8
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
8
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
9
9
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
10
10
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedLatexIdentifiers";
11
- export interface PrettierPluginDepsOptions {
12
- }
13
11
  export declare const options: {
14
12
  readonly embeddedLatexIdentifiers: {
15
13
  readonly category: "Embed";
@@ -27,12 +25,8 @@ declare module "../types.js" {
27
25
  }
28
26
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
29
27
  }
30
- interface PrettierPluginEmbedOptions {
28
+ interface PluginEmbedOptions {
31
29
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
32
30
  }
33
31
  }
34
- declare module "prettier" {
35
- interface Options extends PrettierPluginDepsOptions {
36
- }
37
- }
38
32
  export {};
@@ -1,4 +1,4 @@
1
- import { type Options } from "prettier";
1
+ import type { Options } from "prettier";
2
2
  import type { Embedder } from "../../types.js";
3
3
  import { language } from "./language.js";
4
4
  export declare const embedder: Embedder<Options>;
@@ -6,15 +6,12 @@ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../u
6
6
  * - https://github.com/github-linguist/linguist/blob/7ca3799b8b5f1acde1dd7a8dfb7ae849d3dfb4cd/lib/linguist/languages.yml#L4060
7
7
  */
8
8
  declare const DEFAULT_IDENTIFIERS: readonly ["md", "markdown"];
9
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
9
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
10
10
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
11
11
  declare const MARKDOWN_PARSERS: readonly ["markdown", "mdx", "remark"];
12
12
  type MarkdownParser = (typeof MARKDOWN_PARSERS)[number];
13
13
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedMarkdownIdentifiers";
14
14
  declare const EMBEDDED_LANGUAGE_PARSER: "embeddedMarkdownParser";
15
- export interface PrettierPluginDepsOptions {
16
- __inJsTemplate?: boolean;
17
- }
18
15
  export declare const options: {
19
16
  readonly embeddedMarkdownIdentifiers: {
20
17
  readonly category: "Embed";
@@ -42,13 +39,9 @@ declare module "../types.js" {
42
39
  }
43
40
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
44
41
  }
45
- interface PrettierPluginEmbedOptions {
42
+ interface PluginEmbedOptions {
46
43
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
47
44
  [EMBEDDED_LANGUAGE_PARSER]?: MarkdownParser;
48
45
  }
49
46
  }
50
- declare module "prettier" {
51
- interface Options extends PrettierPluginDepsOptions {
52
- }
53
- }
54
47
  export {};
@@ -0,0 +1,3 @@
1
+ export interface PluginMarkdownOptions {
2
+ __inJsTemplate?: boolean;
3
+ }
@@ -0,0 +1,6 @@
1
+ import "prettier";
2
+ import type { PluginMarkdownOptions } from "./plugin-markdown-types.js";
3
+
4
+ declare module "prettier" {
5
+ interface Options extends PluginMarkdownOptions {}
6
+ }
@@ -1,11 +1,8 @@
1
- import type { NginxOptions } from "prettier-plugin-nginx";
2
- import { type AutocompleteStringList, type StringListToInterfaceKey, type UnionToIntersection } from "../utils.js";
1
+ import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
3
2
  declare const DEFAULT_IDENTIFIERS: readonly ["nginx"];
4
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
3
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
5
4
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
6
5
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedNginxIdentifiers";
7
- export interface PrettierPluginDepsOptions extends Partial<UnionToIntersection<NginxOptions>> {
8
- }
9
6
  export declare const options: {
10
7
  readonly embeddedNginxIdentifiers: {
11
8
  readonly category: "Embed";
@@ -23,12 +20,8 @@ declare module "../types.js" {
23
20
  }
24
21
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
25
22
  }
26
- interface PrettierPluginEmbedOptions {
23
+ interface PluginEmbedOptions {
27
24
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
28
25
  }
29
26
  }
30
- declare module "prettier" {
31
- interface Options extends PrettierPluginDepsOptions {
32
- }
33
- }
34
27
  export {};
@@ -0,0 +1,4 @@
1
+ import type { NginxOptions } from "prettier-plugin-nginx";
2
+ import type { NormalizeOptions } from "../utils.js";
3
+ export interface PluginNginxOptions extends NormalizeOptions<NginxOptions> {
4
+ }
@@ -0,0 +1,6 @@
1
+ import "prettier";
2
+ import type { PluginNginxOptions } from "./plugin-nginx-types.js";
3
+
4
+ declare module "prettier" {
5
+ interface Options extends PluginNginxOptions {}
6
+ }
@@ -1,6 +1,6 @@
1
1
  import type { EmbeddedDefaultIdentifier } from "../types.js";
2
2
  import { type AutocompleteStringList } from "../utils.js";
3
- type EmbeddedIdentifiers = AutocompleteStringList<EmbeddedDefaultIdentifier[]>;
3
+ type EmbeddedIdentifiers = AutocompleteStringList<EmbeddedDefaultIdentifier>;
4
4
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedNoopIdentifiers";
5
5
  export declare const options: {
6
6
  readonly embeddedNoopIdentifiers: {
@@ -17,7 +17,7 @@ type Options = typeof options;
17
17
  declare module "../types.js" {
18
18
  interface EmbeddedOptions extends Options {
19
19
  }
20
- interface PrettierPluginEmbedOptions {
20
+ interface PluginEmbedOptions {
21
21
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: EmbeddedIdentifiers;
22
22
  }
23
23
  }
@@ -1,13 +1,8 @@
1
- import type { EsParser } from "../es/options.js";
2
- import type { TsParser } from "../ts/options.js";
3
1
  import { type AutocompleteStringList, type StringListToInterfaceKey } from "../utils.js";
4
2
  declare const DEFAULT_IDENTIFIERS: readonly ["pegjs", "peggy", "peg"];
5
- type Identifiers = AutocompleteStringList<typeof DEFAULT_IDENTIFIERS>;
3
+ type Identifiers = AutocompleteStringList<(typeof DEFAULT_IDENTIFIERS)[number]>;
6
4
  type DefaultIdentifiersHolder = StringListToInterfaceKey<typeof DEFAULT_IDENTIFIERS>;
7
5
  declare const EMBEDDED_LANGUAGE_IDENTIFIERS: "embeddedPegjsIdentifiers";
8
- export interface PrettierPluginDepsOptions {
9
- actionParser?: EsParser | TsParser;
10
- }
11
6
  export declare const options: {
12
7
  readonly embeddedPegjsIdentifiers: {
13
8
  readonly category: "Embed";
@@ -25,12 +20,8 @@ declare module "../types.js" {
25
20
  }
26
21
  interface EmbeddedDefaultIdentifiersHolder extends DefaultIdentifiersHolder {
27
22
  }
28
- interface PrettierPluginEmbedOptions {
23
+ interface PluginEmbedOptions {
29
24
  [EMBEDDED_LANGUAGE_IDENTIFIERS]?: Identifiers;
30
25
  }
31
26
  }
32
- declare module "prettier" {
33
- interface Options extends PrettierPluginDepsOptions {
34
- }
35
- }
36
27
  export {};
@@ -0,0 +1,5 @@
1
+ import type { EsParser } from "../es/index.js";
2
+ import type { TsParser } from "../ts/index.js";
3
+ export interface PluginPegjsOptions {
4
+ actionParser?: EsParser | TsParser;
5
+ }
@@ -0,0 +1,6 @@
1
+ import "prettier";
2
+ import type { PluginPegjsOptions } from "./plugin-pegjs-types.js";
3
+
4
+ declare module "prettier" {
5
+ interface Options extends PluginPegjsOptions {}
6
+ }