mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore(cloudcmd) lint
This commit is contained in:
parent
551fc98498
commit
a6c7d443ae
7 changed files with 10 additions and 15 deletions
|
|
@ -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,
|
||||
},
|
||||
}],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
/* global btoa */
|
||||
|
||||
module.exports = (str) => {
|
||||
if (typeof btoa === 'function')
|
||||
return btoa(str);
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ const {eslint} = predefined;
|
|||
|
||||
const names = [
|
||||
'bin/cloudcmd.js',
|
||||
'client',
|
||||
'common',
|
||||
'server',
|
||||
'test',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue