import * as deps from './deps.js' ; const { format : prettierFormat , resolveConfig } = deps . prettier ; const commonConfig = resolveConfig ( process . cwd ( ) ) ; export function formatPrettier ( defaultOptions ) { const configPromise = commonConfig . then ( ( config ) => Object . assign ( { } , config , defaultOptions ) ) ; return { async format ( input ) { return prettierFormat ( input , await configPromise ) ; } , } ; }