@@ -34,7 +34,7 @@ function lambdaConfig(base_dir, config_file_tpl, name, default_env) {
3434 ( v ) => vars [ v ] || default_env [ v ] || process . env [ v ] ) ;
3535 let str = '{}' ;
3636 try {
37- // eslint-disable-next-line no-sync
37+ // eslint-disable-next-line node/ no-sync
3838 str = fs . readFileSync ( path . join ( base_dir , config_file ) , 'utf8' ) ;
3939 } catch ( e ) {
4040 // File not found
@@ -68,6 +68,7 @@ function looseOutputLogger(lambda_log) {
6868 */
6969function forkLambda ( base_dir , lambda_path_tpl , name , environment , timeout ,
7070 memoryLimitInMB , max_idle , onKill ) {
71+ // eslint-disable-next-line no-template-curly-in-string
7172 const lambda_path = lambda_path_tpl . replace ( '${LAMBDA_NAME}' , name ) ;
7273 const lambda_file = path . basename ( lambda_path ) ;
7374 const cwd = path . join ( base_dir , path . dirname ( lambda_path ) ) ;
@@ -274,6 +275,7 @@ function forkPool(base_dir, lambda_path_tpl, config_file_tpl, name,
274275 let request_id = 0 ;
275276 return {
276277 invoke ( event , options , callback ) {
278+ // eslint-disable-next-line no-shadow
277279 let entry = entries . find ( entry => entry . active === false ) ;
278280 if ( ! entry ) {
279281 log . spawn ( { name, timeout, memory } ) ;
@@ -322,8 +324,10 @@ function forkPool(base_dir, lambda_path_tpl, config_file_tpl, name,
322324
323325exports . create = function ( base_options = { } ) {
324326 const lambda_path_tpl = base_options . lambda_path
327+ // eslint-disable-next-line no-template-curly-in-string
325328 || 'functions/${LAMBDA_NAME}/index.js' ;
326329 const config_file_tpl = base_options . config_file
330+ // eslint-disable-next-line no-template-curly-in-string
327331 || 'functions/${LAMBDA_NAME}/function.${AWS_PROFILE}.json' ;
328332 const base_dir = base_options . base_dir || process . cwd ( ) ;
329333 const lambdas = { } ;
@@ -351,6 +355,7 @@ exports.create = function (base_options = {}) {
351355 ) ;
352356 } catch ( e ) {
353357 log . error ( 'Failed to launch Lambda' , { name, base_dir } , e ) ;
358+ // eslint-disable-next-line node/no-callback-literal
354359 callback ( `{"message":"Failed to launch \\"${ name } \\""}` ) ;
355360 return ;
356361 }
0 commit comments