1- import * as cosmiconfig from "cosmiconfig" ;
21import lodash from "lodash" ;
32import type { OpenAPI } from "openapi-types" ;
43import * as typescript from "typescript" ;
@@ -87,7 +86,6 @@ export class CodeGenConfig {
8786 outOfModuleApi : "Common" ,
8887 } ;
8988 routeNameDuplicatesMap = new Map ( ) ;
90- prettierOptions = { ...CONSTANTS . PRETTIER_OPTIONS } ;
9189 hooks : Hooks = {
9290 onPreBuildRoutePath : ( _routePath : unknown ) => void 0 ,
9391 onBuildRoutePath : ( _routeData : unknown ) => void 0 ,
@@ -390,7 +388,6 @@ export class CodeGenConfig {
390388 templateExtensions = [ ".eta" , ".ejs" ] ;
391389
392390 constructor ( {
393- prettierOptions = getDefaultPrettierOptions ( ) ,
394391 codeGenConstructs,
395392 primitiveTypeConstructs,
396393 constants,
@@ -405,10 +402,6 @@ export class CodeGenConfig {
405402
406403 this . update ( {
407404 ...otherConfig ,
408- prettierOptions :
409- prettierOptions === undefined
410- ? getDefaultPrettierOptions ( )
411- : prettierOptions ,
412405 hooks : lodash . merge ( this . hooks , hooks || { } ) ,
413406 constants : {
414407 ...CONSTANTS ,
@@ -430,20 +423,3 @@ export class CodeGenConfig {
430423 objectAssign ( this , update ) ;
431424 } ;
432425}
433-
434- const getDefaultPrettierOptions = ( ) => {
435- const prettier = cosmiconfig
436- . cosmiconfigSync ( "prettier" , {
437- searchStrategy : "global" ,
438- } )
439- . search ( ) ;
440-
441- if ( prettier ) {
442- return {
443- ...prettier . config ,
444- parser : "typescript" ,
445- } ;
446- }
447-
448- return { ...CONSTANTS . PRETTIER_OPTIONS } ;
449- } ;
0 commit comments