File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -81,21 +81,21 @@ async function isFileExist(filePath: string) {
8181
8282const findConfig = async ( basePath : string ) : Promise < string | undefined > => {
8383 return new Promise < string | undefined > ( ( resolve ) => {
84- const arr : boolean [ ] = [ ] ;
84+ const arr : boolean [ ] = new Array ( DEFAULT_CONFIG_EXTENSIONS . length ) . fill (
85+ null ,
86+ ) ;
8587 DEFAULT_CONFIG_EXTENSIONS . forEach ( async ( ext , index ) => {
8688 const configPath = basePath + ext ;
8789 const isExist = await isFileExist ( configPath ) ;
8890 arr [ index ] = isExist ;
89- const allResolved = arr . slice ( 0 , index ) . every ( ( i ) => {
90- return i === false ;
91- } ) ;
91+ const allResolved = arr . slice ( 0 , index ) . every ( ( i ) => i === false ) ;
9292
9393 if ( allResolved ) {
9494 if ( isExist ) {
9595 resolve ( configPath ) ;
9696 return ;
9797 }
98- if ( arr . slice ( index + 1 ) . every ( ( i ) => i === false ) ) {
98+ if ( arr . every ( ( i ) => i === false ) ) {
9999 resolve ( undefined ) ;
100100 return ;
101101 }
You can’t perform that action at this time.
0 commit comments