From 4db95c5e6739e18104bf7d80df0d54fb58a49eaf Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 16 Feb 2021 16:40:21 +0530 Subject: [PATCH] lint compliance --- scripts/unused-translations.js | 9 +++++---- www/pad/inner.js | 5 ++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/unused-translations.js b/scripts/unused-translations.js index 8cb2fbc75..9c09ad54e 100644 --- a/scripts/unused-translations.js +++ b/scripts/unused-translations.js @@ -54,10 +54,10 @@ var grep = function (pattern, cb) { }).join(' '); // grep this repository, ignoring binary files and excluding anything matching the above patterns - var ignoreBinaries= '--binary-files=without-match '; + //var ignoreBinaries= '--binary-files=without-match '; var command = 'git grep ' + pattern + " -- ':/' " + exclude; - Exec(command, function (err, stdout, stderr) { + Exec(command, function (err, stdout /*, stderr */) { if (err && err.code === 1 && err.killed === false) { if (isPossiblyGenerated(pattern)) { return cb(void 0, true, 'POSSIBLY_GENERATED'); @@ -114,13 +114,14 @@ var next = function () { if (!key) { return; } keys.shift(); - if (!limit--) { return void console.log("[DONE]"); } + if (!limit) { return void console.log("[DONE]"); } + limit--; grep(key, function (err, flagged, reason, output) { if (err) { - return; console.error("[%s]", key, err); console.log(); + return; } else if (!flagged) { } else if (reason === 'OTHER') { diff --git a/www/pad/inner.js b/www/pad/inner.js index 6d84d9f99..ede92a9e9 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -679,6 +679,7 @@ define([ var metadataMgr = framework._.sfCommon.getMetadataMgr(); var privateData = metadataMgr.getPrivateData(); var common = framework._.sfCommon; + var APP = window.APP; var comments = Comments.create({ framework: framework, @@ -822,7 +823,7 @@ define([ // If we've clicked on the show/hide buttons, always use our last value if (typeof(localHide) === "boolean") { hide = localHide; } - if (APP.mobile) { + if (window.APP.mobile) { hide = false; } @@ -1413,6 +1414,8 @@ define([ $contentContainer.append(h('div#cp-app-pad-resize')); var comments = h('div#cp-app-pad-comments'); + var APP = window.APP; + APP.commentsEl = comments; if (APP.mobile) { APP.comments = UI.dialog.customModal(comments, {