chore(cloudcmd) lint

This commit is contained in:
coderaiser 2019-07-22 20:42:09 +03:00
parent 551fc98498
commit a6c7d443ae
7 changed files with 10 additions and 15 deletions

View file

@ -1,6 +1,9 @@
'use strict';
module.exports = {
env: {
browser: true,
},
rules: {
'no-console': 0,
},
@ -19,10 +22,5 @@ module.exports = {
extends: [
'plugin:node/recommended',
],
}, {
files: ['client', 'static'],
env: {
browser: true,
},
}],
};

View file

@ -243,8 +243,8 @@ function CloudCmdProto(DOM) {
const showLoad = Images.show.load;
const doBefore = {
'edit': showLoad,
'menu': showLoad,
edit: showLoad,
menu: showLoad,
};
const load = (name, path, dobefore) => {

View file

@ -18,9 +18,7 @@ module.exports = function loadModule(params) {
if (!params)
return;
const {
path,
} = params;
const {path} = params;
const name = path && noJS(pascalCase(path));
const doBefore = params.dobefore;

View file

@ -105,7 +105,7 @@ const create = async () => {
CloudCmd.on('active-dir', config.if('syncConsolePath', cd(konsole.handler)));
konsole.addShortCuts({
'P': () => {
P: () => {
const command = konsole.getPromptText();
const path = DOM.getCurrentDirPath();

View file

@ -117,8 +117,8 @@ function getMenuData(isAuth) {
const menu = {
'Paste': Buffer.paste,
'New': {
'File': DOM.promptNewFile,
'Directory': DOM.promptNewDir,
File: DOM.promptNewFile,
Directory: DOM.promptNewDir,
},
'Upload': () => {
CloudCmd.Upload.show();

View file

@ -1,7 +1,5 @@
'use strict';
/* global btoa */
module.exports = (str) => {
if (typeof btoa === 'function')
return btoa(str);

View file

@ -11,6 +11,7 @@ const {eslint} = predefined;
const names = [
'bin/cloudcmd.js',
'client',
'common',
'server',
'test',