diff --git a/tools/lint-sh.js b/tools/lint-sh.js index 42889c16b6af0e..378cb38af28744 100755 --- a/tools/lint-sh.js +++ b/tools/lint-sh.js @@ -166,11 +166,11 @@ if ( const entryPoint = resolve(process.argv[2]); const stats = statSync(entryPoint, { throwIfNoEntry: false }); - function onError(e) { + const onError = (e) => { console.log(USAGE_STR); console.error(e); process.exitCode = 1; - } + }; if (stats?.isDirectory()) { SPAWN_OPTIONS.cwd = entryPoint; checkFiles(...findScriptFilesRecursively(entryPoint)).catch(onError);