From 444f659076447e7668fda544d1729ee24e296052 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 20 Jul 2022 20:16:22 +0300 Subject: [PATCH] chore(cloudcmd) lint --- client/client.js | 1 + client/key/set-current-by-char.js | 1 + client/key/vim/vim.js | 4 ++++ client/modules/operation/set-listeners.js | 1 + server/rest/index.js | 1 + 5 files changed, 8 insertions(+) diff --git a/client/client.js b/client/client.js index bb998a33..0c2ef983 100644 --- a/client/client.js +++ b/client/client.js @@ -182,6 +182,7 @@ function CloudCmdProto(DOM) { if (file && !current) { const msg = formatMsg('set current file', file, 'error'); CloudCmd.log(msg); + return; } diff --git a/client/key/set-current-by-char.js b/client/key/set-current-by-char.js index 3fb79e2b..5ab4599a 100644 --- a/client/key/set-current-by-char.js +++ b/client/key/set-current-by-char.js @@ -37,6 +37,7 @@ module.exports = function setCurrentByChar(char, charStore) { if (!skipCount) { setted = true; DOM.setCurrentFile(byName); + return true; } diff --git a/client/key/vim/vim.js b/client/key/vim/vim.js index 7a3d4017..f1ca62a4 100644 --- a/client/key/vim/vim.js +++ b/client/key/vim/vim.js @@ -44,6 +44,7 @@ module.exports = (key, operations) => { if (key === 'Escape') { visual(false); escape(); + return end(); } @@ -97,6 +98,7 @@ module.exports = (key, operations) => { if (key === 'd' && (visual() || prevStore === 'd')) { stopVisual(); remove(); + return end(); } @@ -115,6 +117,7 @@ module.exports = (key, operations) => { stopVisual(); copy(); + return end(); } @@ -126,6 +129,7 @@ module.exports = (key, operations) => { if (/^v$/i.test(key)) { visual(!visual()); select(); + return end(); } diff --git a/client/modules/operation/set-listeners.js b/client/modules/operation/set-listeners.js index 3378227a..486a7145 100644 --- a/client/modules/operation/set-listeners.js +++ b/client/modules/operation/set-listeners.js @@ -68,6 +68,7 @@ module.exports = (options) => (emitter) => { listeners.end(error); Dialog.alert(error); progress.remove(); + return; } diff --git a/server/rest/index.js b/server/rest/index.js index b3989191..4f60bcfa 100644 --- a/server/rest/index.js +++ b/server/rest/index.js @@ -125,6 +125,7 @@ function onGET(params, config, callback) { if (cmd.startsWith('pack')) { cmd = cmd.replace(/^pack/, ''); streamPack(root(cmd, rootDir), p.response, packer); + return; }