File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import { options as pugOptions } from './options';
1515import { convergeOptions } from './options/converge' ;
1616import type { PugPrinterOptions } from './printer' ;
1717import { PugPrinter } from './printer' ;
18- import { default as parseFrontmatter } from './utils/frontmatter/parse' ;
18+ import parseFrontmatter from './utils/frontmatter/parse' ;
1919
2020/** Ast path stack entry. */
2121interface AstPathStackEntry {
@@ -101,7 +101,8 @@ export const plugin: Plugin<AstPathStackEntry> = {
101101 } ,
102102 printers : {
103103 'pug-ast' : {
104- print (
104+ // @ts -expect-error: Prettier allow it to be async if we don't do recursively print
105+ async print (
105106 path : AstPath ,
106107 options : ParserOptions & PugParserOptions ,
107108 print : ( path : AstPath ) => Doc ,
@@ -115,7 +116,7 @@ export const plugin: Plugin<AstPathStackEntry> = {
115116 pugOptions ,
116117 frontmatter ,
117118 ) ;
118- const result : string = printer . build ( ) ;
119+ const result : string = await printer . build ( ) ;
119120 logger . debug ( '[printers:pug-ast:print]:' , result ) ;
120121 return result ;
121122 } ,
Original file line number Diff line number Diff line change 1+ import { types } from 'node:util' ;
12import type { BuiltInParserName , Options , RequiredOptions } from 'prettier' ;
23import { format } from 'prettier' ;
34import type PrettierAngularPlugin from 'prettier/plugins/angular' ;
You can’t perform that action at this time.
0 commit comments