feature(package) eslint v4.0.0

This commit is contained in:
coderaiser 2017-06-12 17:24:21 +03:00
parent ca5a614a55
commit 71d366a6a1
11 changed files with 51 additions and 47 deletions

View file

@ -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}');`
};
}

View file

@ -96,7 +96,7 @@ function BufferProto() {
function clear() {
Storage.remove(COPY)
.remove(CUT);
.remove(CUT);
rmCutClass();
}

View file

@ -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
*/

View file

@ -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;

View file

@ -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,
});
};

View file

@ -108,7 +108,7 @@ function KeyProto() {
};
function getChar(event) {
/*
/*
* event.keyIdentifier deprecated in chrome v51
* but event.key is absent in chrome <= v51
*/

View file

@ -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);
});
}

View file

@ -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 "%"

View file

@ -276,7 +276,7 @@ function OperationProto(operation, data) {
twopack('extract');
};
/**
/**
* prompt and delete current file or selected files
*
* @currentFile

View file

@ -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",

View file

@ -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',