@@ -164,16 +164,16 @@ const EnrichedVisitorKeys = (function() {
164164 } ;
165165
166166 // check for unknown keys in our configuration
167- for ( let type in TempKeys ) {
167+ for ( const type in TempKeys ) {
168168 if ( VisitorKeys [ type ] === undefined ) {
169169 throw new Error ( "configuration contains unknown node type '" + type + "'" ) ;
170170 }
171171 }
172172
173173 // merge with 'official' visitor keys
174174 Object . keys ( VisitorKeys ) . forEach ( ( type ) => {
175- let visitorKeys = VisitorKeys [ type ] ;
176- let condKeys = TempKeys [ type ] ;
175+ const visitorKeys = VisitorKeys [ type ] ;
176+ const condKeys = TempKeys [ type ] ;
177177 if ( condKeys === undefined ) {
178178 // configuration missing in ConditionalKeys, maybe a new syntax ?
179179 throw new Error ( `unknown estree node type '${ type } ', new syntax?` ) ;
@@ -269,7 +269,7 @@ class JSModuleAnalyzer {
269269 return ;
270270 }
271271
272- let condKeys = EnrichedVisitorKeys [ node . type ] ;
272+ const condKeys = EnrichedVisitorKeys [ node . type ] ;
273273 switch ( node . type ) {
274274 case Syntax . CallExpression :
275275 if ( ! conditional && isMethodCall ( node , CALL_JQUERY_SAP_DECLARE ) ) {
@@ -336,7 +336,7 @@ class JSModuleAnalyzer {
336336 || isMethodCall ( node , CALL_REQUIRE_PRELOAD )
337337 || isMethodCall ( node , CALL_SAP_UI_REQUIRE_PRELOAD ) ) {
338338 // recognizes a call to jQuery.sap.registerPreloadedModules
339- let legacyCall = isMethodCall ( node , CALL_JQUERY_SAP_REGISTER_PRELOADED_MODULES ) ;
339+ const legacyCall = isMethodCall ( node , CALL_JQUERY_SAP_REGISTER_PRELOADED_MODULES ) ;
340340 info . setFormat ( legacyCall ? ModuleFormat . UI5_LEGACY : ModuleFormat . UI5_DEFINE ) ;
341341 onRegisterPreloadedModules ( node , legacyCall ) ;
342342 } else if ( isCallableExpression ( node . callee ) ) {
@@ -346,7 +346,7 @@ class JSModuleAnalyzer {
346346 visit ( node . callee . body , conditional ) ;
347347 } else {
348348 // default visit
349- for ( let key of condKeys ) {
349+ for ( const key of condKeys ) {
350350 visit ( node [ key . key ] , key . conditional || conditional ) ;
351351 }
352352 }
@@ -366,7 +366,7 @@ class JSModuleAnalyzer {
366366 visit ( node . alternate , true ) ;
367367 } else {
368368 // default visit
369- for ( let key of condKeys ) {
369+ for ( const key of condKeys ) {
370370 visit ( node [ key . key ] , key . conditional || conditional ) ;
371371 }
372372 }
@@ -378,7 +378,7 @@ class JSModuleAnalyzer {
378378 throw new Error ( `Unhandled AST node type ${ node . type } ` ) ;
379379 }
380380 // default visit
381- for ( let key of condKeys ) {
381+ for ( const key of condKeys ) {
382382 visit ( node [ key . key ] , key . conditional || conditional ) ;
383383 }
384384 break ;
@@ -454,7 +454,7 @@ class JSModuleAnalyzer {
454454 } else {
455455 // UI5 signature with one or many required modules
456456 for ( let i = 0 ; i < nArgs ; i ++ ) {
457- let arg = args [ i ] ;
457+ const arg = args [ i ] ;
458458 if ( isString ( arg ) ) {
459459 const requiredModuleName = ModuleName . fromUI5LegacyName ( arg . value ) ;
460460 info . addDependency ( requiredModuleName , conditional ) ;
@@ -475,7 +475,7 @@ class JSModuleAnalyzer {
475475 function onSapUiRequireSync ( node , conditional ) {
476476 const args = node . arguments ;
477477 const nArgs = args . length ;
478- let i = 0 ;
478+ const i = 0 ;
479479
480480 if ( i < nArgs && isString ( args [ i ] ) ) {
481481 const moduleName = ModuleName . fromRequireJSName ( args [ i ] . value ) ;
@@ -509,7 +509,7 @@ class JSModuleAnalyzer {
509509 if ( legacyCall ) {
510510 const obj = args [ 0 ] ;
511511 isNewSyntax = false ;
512- let version = findOwnProperty ( obj , "version" ) ;
512+ const version = findOwnProperty ( obj , "version" ) ;
513513 if ( version && isString ( version ) && parseFloat ( version . value ) >= 2.0 ) {
514514 isNewSyntax = true ;
515515 }
0 commit comments