Skip to content

Commit 1a8da4e

Browse files
committed
refactor: Created printers.ts
1 parent 152214d commit 1a8da4e

9 files changed

Lines changed: 288 additions & 275 deletions

File tree

src/main.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
import type { Plugin, Printer } from 'prettier';
1+
import type { Plugin } from 'prettier';
22

33
import { languages } from './languages.js';
44
import { options } from './options.js';
55
import { parsers } from './parsers.js';
6-
import { printer } from './print/index.js';
7-
import { type NodeType, PRINTER_NAME } from './utils/index.js';
8-
9-
const printers: Record<string, Printer<NodeType>> = {
10-
[PRINTER_NAME]: printer,
11-
};
6+
import { printers } from './printers.js';
7+
import type { NodeType } from './utils/index.js';
128

139
const plugin: Plugin<NodeType> = {
1410
languages,

src/options.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,6 @@ const templateExportDefault: BooleanSupportOption = {
1818
type: 'boolean',
1919
};
2020

21-
/**
22-
* Extracts a valid `templateSingleQuote` option out of the provided options. If
23-
* `templateSingleQuote` is defined, it will be used, otherwise the value for
24-
* `singleQuote` will be inherited.
25-
*/
26-
export function getTemplateSingleQuote(options: PluginOptions): boolean {
27-
const { singleQuote, templateSingleQuote } = options;
28-
return typeof templateSingleQuote === 'boolean'
29-
? templateSingleQuote
30-
: singleQuote;
31-
}
32-
3321
const templateSingleQuote: BooleanSupportOption = {
3422
category: 'Format',
3523
description:

src/print/index.ts

Lines changed: 0 additions & 173 deletions
This file was deleted.

src/print/template.ts

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)