File tree Expand file tree Collapse file tree 2 files changed +12
-21
lines changed
Expand file tree Collapse file tree 2 files changed +12
-21
lines changed Original file line number Diff line number Diff line change 1- import type { Plugin } from 'prettier' ;
2-
3- import { languages } from './languages.js' ;
4- import { options } from './options.js' ;
5- import { parsers } from './parsers.js' ;
6- import { printers } from './printers.js' ;
7- import type { NodeType } from './utils/index.js' ;
8-
9- const plugin : Plugin < NodeType > = {
10- languages,
11- parsers,
12- printers,
13- options,
14- } ;
15-
16- export default plugin ;
1+ export { languages } from './languages.js' ;
2+ export { options } from './options.js' ;
3+ export { parsers } from './parsers.js' ;
4+ export { printers } from './printers.js' ;
Original file line number Diff line number Diff line change 11import type { Plugin } from 'prettier' ;
22import { format as prettierFormat } from 'prettier' ;
33
4- import plugin from '../../src/main.js' ;
4+ import { languages , options , parsers , printers } from '../../src/main.js' ;
55import type { PluginOptions } from '../../src/options.js' ;
66
7- const DEFAULT_OPTIONS : Partial < PluginOptions > = {
8- parser : 'ember-template-tag' ,
9- plugins : [ plugin as Plugin ] ,
7+ const plugin : Plugin = {
8+ languages,
9+ options,
10+ parsers,
11+ printers,
1012} ;
1113
1214/**
@@ -20,7 +22,8 @@ export async function format(
2022 overrides : Partial < PluginOptions > = { } ,
2123) : Promise < string > {
2224 return await prettierFormat ( code , {
23- ...DEFAULT_OPTIONS ,
2425 ...overrides ,
26+ parser : 'ember-template-tag' ,
27+ plugins : [ plugin ] ,
2528 } ) ;
2629}
You can’t perform that action at this time.
0 commit comments