@@ -461,24 +461,24 @@ function normalizePackageName(name, prefix) {
461
461
function resolve ( filePath , relativeTo ) {
462
462
if ( isFilePath ( filePath ) ) {
463
463
return { filePath : path . resolve ( relativeTo || "" , filePath ) } ;
464
- } else {
465
- let normalizedPackageName ;
466
-
467
- if ( filePath . indexOf ( "plugin:" ) === 0 ) {
468
- const packagePath = filePath . substr ( 7 , filePath . lastIndexOf ( "/" ) - 7 ) ;
469
- const configName = filePath . substr ( filePath . lastIndexOf ( "/" ) + 1 , filePath . length - filePath . lastIndexOf ( "/" ) - 1 ) ;
470
-
471
- normalizedPackageName = normalizePackageName ( packagePath , "eslint-plugin" ) ;
472
- debug ( `Attempting to resolve ${ normalizedPackageName } ` ) ;
473
- filePath = resolver . resolve ( normalizedPackageName , getLookupPath ( relativeTo ) ) ;
474
- return { filePath, configName } ;
475
- } else {
476
- normalizedPackageName = normalizePackageName ( filePath , "eslint-config" ) ;
477
- debug ( `Attempting to resolve ${ normalizedPackageName } ` ) ;
478
- filePath = resolver . resolve ( normalizedPackageName , getLookupPath ( relativeTo ) ) ;
479
- return { filePath } ;
480
- }
481
464
}
465
+ let normalizedPackageName ;
466
+
467
+ if ( filePath . indexOf ( "plugin:" ) === 0 ) {
468
+ const packagePath = filePath . substr ( 7 , filePath . lastIndexOf ( "/" ) - 7 ) ;
469
+ const configName = filePath . substr ( filePath . lastIndexOf ( "/" ) + 1 , filePath . length - filePath . lastIndexOf ( "/" ) - 1 ) ;
470
+
471
+ normalizedPackageName = normalizePackageName ( packagePath , "eslint-plugin" ) ;
472
+ debug ( `Attempting to resolve ${ normalizedPackageName } ` ) ;
473
+ filePath = resolver . resolve ( normalizedPackageName , getLookupPath ( relativeTo ) ) ;
474
+ return { filePath, configName } ;
475
+ }
476
+ normalizedPackageName = normalizePackageName ( filePath , "eslint-config" ) ;
477
+ debug ( `Attempting to resolve ${ normalizedPackageName } ` ) ;
478
+ filePath = resolver . resolve ( normalizedPackageName , getLookupPath ( relativeTo ) ) ;
479
+ return { filePath } ;
480
+
481
+
482
482
483
483
}
484
484
0 commit comments