diff --git a/client/dom/index.js b/client/dom/index.js index e2b888b6..4dde2d1f 100644 --- a/client/dom/index.js +++ b/client/dom/index.js @@ -40,7 +40,7 @@ const loadRemote = require('./load-remote'); const selectByPattern = require('./select-by-pattern'); function CmdProto() { - let CurrentInfo = {}; + const CurrentInfo = {}; const Cmd = this; const SELECTED_FILE = 'selected-file'; diff --git a/client/modules/menu.js b/client/modules/menu.js index 02a82bd6..43f280bd 100644 --- a/client/modules/menu.js +++ b/client/modules/menu.js @@ -199,7 +199,7 @@ function beforeShow(callback, params) { const { name } = params; - let el = DOM.getCurrentByPosition({ + const el = DOM.getCurrentByPosition({ x: params.x, y: params.y }); diff --git a/client/modules/operation/index.js b/client/modules/operation/index.js index 12927bc5..656322d8 100644 --- a/client/modules/operation/index.js +++ b/client/modules/operation/index.js @@ -272,7 +272,7 @@ function deleteSilent(files = DOM.getActiveFiles()) { const names = Info.files.map(DOM.getCurrentName); const isCurrent = names.includes(currentName); - let name = isCurrent ? currentName : nextCurrentName; + const name = isCurrent ? currentName : nextCurrentName; DOM.setCurrentByName(name); }); @@ -289,7 +289,6 @@ function _processFiles(options, data) { let files; let panel; let shouldAsk; - let sameName; let ok; let from = ''; @@ -317,7 +316,7 @@ function _processFiles(options, data) { const name = names[0]; - sameName = DOM.getCurrentByName(name, panel); + const sameName = DOM.getCurrentByName(name, panel); if (!data && noFilesCheck()) return; diff --git a/common/util.js b/common/util.js index 77f0a6c6..52f76827 100644 --- a/common/util.js +++ b/common/util.js @@ -63,7 +63,7 @@ module.exports.findObjByNameInArr = (array, name) => { throw Error('name should be string!'); array.some((item) => { - let is = item.name === name; + const is = item.name === name; const isArray = Array.isArray(item); if (is) {