diff --git a/bin/legacy.js b/bin/legacy.js index c30802c3..890a56a0 100755 --- a/bin/legacy.js +++ b/bin/legacy.js @@ -13,13 +13,13 @@ const setDir = (name) => { }; fs.readdirSync(dir) - .map(fillFile) - .map(writeFile); + .map(fillFile) + .map(writeFile); function fillFile(name) { return { name: setDir(name), - data: `module.exports = require(\'../../server_/${name}\');` + data: `module.exports = require('../../server_/${name}');` }; } diff --git a/client/dom/buffer.js b/client/dom/buffer.js index 9badc537..911f418e 100644 --- a/client/dom/buffer.js +++ b/client/dom/buffer.js @@ -96,7 +96,7 @@ function BufferProto() { function clear() { Storage.remove(COPY) - .remove(CUT); + .remove(CUT); rmCutClass(); } diff --git a/client/dom/index.js b/client/dom/index.js index 27b228e5..2fbf4e37 100644 --- a/client/dom/index.js +++ b/client/dom/index.js @@ -484,7 +484,7 @@ function CmdProto() { return DOM; }; - /* + /* * set current file by position * * @param layer - element @@ -655,7 +655,7 @@ function CmdProto() { return ret; }; - /** + /** * get link from current (or param) file * * @param currentFile - current file by default @@ -970,7 +970,7 @@ function CmdProto() { return currentNew; }; - /** + /** * remove selected files from file table * @Selected */ diff --git a/client/dom/load.js b/client/dom/load.js index bc09f3d8..59eee7b8 100644 --- a/client/dom/load.js +++ b/client/dom/load.js @@ -78,7 +78,7 @@ function load(params) { if (/^(script|link)$/.test(name)) Events.addOnce('load', element, funcLoad) - .addError(element, funcError); + .addError(element, funcError); if (id) element.id = id; diff --git a/client/dom/rest.js b/client/dom/rest.js index bb4d9e35..32065861 100644 --- a/client/dom/rest.js +++ b/client/dom/rest.js @@ -29,25 +29,29 @@ function RESTful() { }); }; - this.patch = function(url, data, callback) { - var isFunc = itype.function(data); + this.patch = (url, data, callback) => { + const isFunc = itype.function(data); if (!callback && isFunc) { callback = data; data = null; } + const imgPosition = { + top: true + }; + sendRequest({ - method : 'PATCH', - url : FS + url, - data : data, - callback : callback, - imgPosition : { top: true } + method: 'PATCH', + url: FS + url, + data, + callback, + imgPosition, }); }; - this.write = function(url, data, callback) { - var isFunc = itype.function(data); + this.write = (url, data, callback) => { + const isFunc = itype.function(data); if (!callback && isFunc) { callback = data; @@ -55,20 +59,20 @@ function RESTful() { } sendRequest({ - method : 'PUT', - url : FS + url, - data : data, - callback : callback, + method: 'PUT', + url: FS + url, + data, + callback, imgPosition : { top: true } }); }; - this.read = function(url, dataType, callback) { - var isQuery = /\?/.test(url); - var isBeautify = /\?beautify$/.test(url); - var isMinify = /\?minify$/.test(url); - var notLog = !isQuery || isBeautify || isMinify; - var isFunc = itype.function(dataType); + this.read = (url, dataType, callback) => { + const isQuery = /\?/.test(url); + const isBeautify = /\?beautify$/.test(url); + const isMinify = /\?minify$/.test(url); + const notLog = !isQuery || isBeautify || isMinify; + const isFunc = itype.function(dataType); if (!callback && isFunc) { callback = dataType; @@ -78,28 +82,28 @@ function RESTful() { sendRequest({ method: 'GET', url: FS + url, - callback: callback, - notLog: notLog, - dataType: dataType + callback, + notLog, + dataType, }); }; - this.cp = function(data, callback) { + this.cp = (data, callback) => { sendRequest({ - method : 'PUT', - url : '/cp', - data : data, - callback : callback, + method: 'PUT', + url: '/cp', + data, + callback, imgPosition : { top: true } }); }; - this.pack = function(data, callback) { + this.pack = (data, callback) => { sendRequest({ method : 'PUT', url : '/pack', - data : data, - callback : callback + data, + callback, }); }; diff --git a/client/key.js b/client/key.js index abfa8a0a..0b0c3db3 100644 --- a/client/key.js +++ b/client/key.js @@ -108,7 +108,7 @@ function KeyProto() { }; function getChar(event) { - /* + /* * event.keyIdentifier deprecated in chrome v51 * but event.key is absent in chrome <= v51 */ diff --git a/client/listeners/index.js b/client/listeners/index.js index aa1cc9ea..6df38853 100644 --- a/client/listeners/index.js +++ b/client/listeners/index.js @@ -296,7 +296,7 @@ function onTouch(event) { event.preventDefault(); } - /* +/* * download file from browser to desktop * in Chrome (HTML5) */ @@ -445,7 +445,7 @@ function dragndrop() { [...panels].forEach((panel) => { Events.add('dragover', panel, onDragOver) - .add('drop', panel, onDrop); + .add('drop', panel, onDrop); }); } diff --git a/client/modules/menu.js b/client/modules/menu.js index cb87255f..6d9d90ed 100644 --- a/client/modules/menu.js +++ b/client/modules/menu.js @@ -277,7 +277,7 @@ function MenuProto(position) { files.forEach((file) => { const selected = DOM.isSelected(file); const isDir = DOM.isCurrentIsDir(file); - /* + /* * if we send ajax request - * no need in hash so we escape # * and all other characters, like "%" diff --git a/client/modules/operation/index.js b/client/modules/operation/index.js index 9b6366b7..6076c69d 100644 --- a/client/modules/operation/index.js +++ b/client/modules/operation/index.js @@ -276,7 +276,7 @@ function OperationProto(operation, data) { twopack('extract'); }; - /** + /** * prompt and delete current file or selected files * * @currentFile diff --git a/package.json b/package.json index 5d018b87..9dda668d 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,7 @@ "emitify": "^3.0.2", "es6-promise": "^4.0.5", "es6-promisify": "^5.0.0", - "eslint": "^3.1.1", + "eslint": "^4.0.0", "gunzip-maybe": "^1.3.1", "html-looks-like": "^1.0.2", "jscs": "^3.0.1", diff --git a/server/route.js b/server/route.js index 4177b392..ff244e28 100644 --- a/server/route.js +++ b/server/route.js @@ -85,15 +85,15 @@ function indexProcessing(options) { if (noConfig) data = data - .replace('icon-config', 'icon-config none'); + .replace('icon-config', 'icon-config none'); if (noConsole) data = data - .replace('icon-console', 'icon-console none'); + .replace('icon-console', 'icon-console none'); if (noTerminal) data = data - .replace('icon-terminal', 'icon-terminal none'); + .replace('icon-terminal', 'icon-terminal none'); let left = rendy(Template.panel, { side : 'left',