File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -309,7 +309,7 @@ async function doReadmeCodegen(
309309 readmeCodegen ( ) ,
310310 "markdown" ,
311311 readmePath ,
312- opts ,
312+ { ignoreLocalConfig : true , ... opts } ,
313313 ) ;
314314}
315315
@@ -331,7 +331,7 @@ async function doTsconfigCodegen(
331331 tsconfigCodegen ( ) ,
332332 "json" ,
333333 tsconfigPath ,
334- opts ,
334+ { ignoreLocalConfig : true , ... opts } ,
335335 ) ;
336336}
337337
@@ -547,15 +547,17 @@ async function writeFormattedFile(
547547 options ?: {
548548 dryRun ?: boolean ;
549549 debug ?: boolean ;
550+ ignoreLocalConfig ?: boolean ;
550551 } ,
551552) {
552553 // Run prettier so we don't have to think about formatting!
553- //
554- // This is a little sketchy because we are using the default prettier config
555- // (not our user's one) but it's better than nothing.
554+ // If we can find them, use the developer's Prettier configuration.
555+ const config = options ?. ignoreLocalConfig
556+ ? null
557+ : await prettier . resolveConfig ( destination ) ;
556558 const formattedContents = await prettier . format ( contents , {
557559 parser : filetype ,
558- pluginSearchDirs : false ,
560+ ... config ,
559561 } ) ;
560562 if ( options ?. debug ) {
561563 // NB: The `test_codegen_projects_are_up_to_date` smoke test depends
You can’t perform that action at this time.
0 commit comments