import plugin , { StartFile , StartFilesProps } from '@start/plugin/src/' ; type Options = { [ key ] : any ; } ; export default ( options ? ) => plugin ( 'prettierEslint' , ( { logPath } ) => async ( { files } ) => { const { default : format } = await import ( 'prettier-eslint' ) ; return { files : await Promise . all ( files . map ( ( file ) => new Promise < StartFile > ( ( resolve , reject ) => { const formatted = format ( { ... options , filePath : file . path , text : file . data } ) ; if ( file . data !== formatted ) { logPath ( file . path ) ; } resolve ( { ... file , data : formatted } ) ; } ) ) ) } ; } ) ;