File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 11import { writeFile } from 'node:fs/promises' ;
22import { resolve } from 'node:path' ;
33
4- import { format , resolveConfig } from 'prettier' ;
4+ import * as prettier from 'prettier' ;
55
66import type { TSESLint } from '@typescript-eslint/utils' ;
77
88const __dirname = new URL ( '.' , import . meta. url ) . pathname ;
99
10- const prettierConfig = resolveConfig ( __dirname ) ;
10+ const prettierConfig = prettier . resolveConfig ( __dirname ) ;
1111
1212const addAutoGeneratedComment = ( code : string ) =>
1313 [
@@ -30,7 +30,7 @@ export const writeConfig = async (
3030
3131 export default ${ JSON . stringify ( config ) } satisfies Linter.LegacyConfig;
3232 ` ;
33- const configStr = await format ( addAutoGeneratedComment ( code ) , {
33+ const configStr = await prettier . format ( addAutoGeneratedComment ( code ) , {
3434 parser : 'typescript' ,
3535 ...( await prettierConfig ) ,
3636 } ) ;
You can’t perform that action at this time.
0 commit comments