Skip to content

Commit

Permalink
chore(cloudcmd) add dangle-comma
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Feb 1, 2019
1 parent 4447d43 commit ea08b92
Show file tree
Hide file tree
Showing 69 changed files with 242 additions and 242 deletions.
2 changes: 1 addition & 1 deletion .webpack/css.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function extract(extractPlugin) {
test: RegExp(`css/${filename}`),
use: extractPlugin.extract([
'css-loader',
])
]),
};
}

10 changes: 5 additions & 5 deletions .webpack/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const babelDev = {
plugins: [
'module:babel-plugin-macros',
'@babel/plugin-proposal-object-rest-spread',
]
],
};

const rules = clean([
Expand All @@ -45,12 +45,12 @@ const rules = clean([
test: /sw\.js$/,
exclude: /node_modules/,
loader: 'babel-loader',
options: babelDev
options: babelDev,
}]);

const plugins = [
new EnvironmentPlugin({
NODE_ENV: 'production'
NODE_ENV: 'production',
}),

new ServiceWorkerWebpackPlugin({
Expand All @@ -66,7 +66,7 @@ const splitChunks = {

module.exports = {
resolve: {
symlinks: false
symlinks: false,
},
devtool,
optimization: {
Expand Down Expand Up @@ -100,7 +100,7 @@ module.exports = {
publicPath: '/dist/',
},
externals: [
externals
externals,
],
module: {
rules,
Expand Down
6 changes: 3 additions & 3 deletions bin/cloudcmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ const args = require('minimist')(argv.slice(2), {
u: 'username',
s: 'save',
a: 'auth',
c: 'config'
c: 'config',
},
unknown: (cmd) => {
exit('\'%s\' is not a cloudcmd option. See \'cloudcmd --help\'.', cmd);
}
},
});

if (args.version)
Expand Down Expand Up @@ -266,7 +266,7 @@ function readConfig(name) {
const forEachKey = require('for-each-key');

const readjsonSync = (name) => jju.parse(fs.readFileSync(name, 'utf8'), {
mode: 'json'
mode: 'json',
});

const [error, data] = tryCatch(readjsonSync, name);
Expand Down
2 changes: 1 addition & 1 deletion bin/release.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function main(callback) {
replaceVersion('HELP.md', version, versionNew, () => {
const historyNew = history + rendy(template, {
date : shortdate(),
version : versionNew
version : versionNew,
});

replaceVersion('HELP.md', history, historyNew, callback);
Expand Down
16 changes: 8 additions & 8 deletions client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function CloudCmdProto(DOM) {

const {
Storage,
Files
Files,
} = DOM;

this.log = log;
Expand Down Expand Up @@ -103,7 +103,7 @@ function CloudCmdProto(DOM) {
panel,
history,
noCurrent,
currentName
currentName,
} = p;

let panelChanged;
Expand Down Expand Up @@ -231,7 +231,7 @@ function CloudCmdProto(DOM) {

loadModule({
path,
func
func,
});
});

Expand Down Expand Up @@ -273,7 +273,7 @@ function CloudCmdProto(DOM) {
// when hash is present
// it should be handled with this.route
// overwre otherwise
history: !location.hash
history: !location.hash,
});

const dirPath = DOM.getCurrentDirPath();
Expand Down Expand Up @@ -446,8 +446,8 @@ function CloudCmdProto(DOM) {
file : templFile,
path : templPath,
pathLink : templPathLink,
link : templLink
}
link : templLink,
},
});

Listeners.setOnPanel(panel);
Expand Down Expand Up @@ -517,7 +517,7 @@ function CloudCmdProto(DOM) {
const {
dir,
dirPath,
parentDirPath
parentDirPath,
} = Info;

if (dirPath === parentDirPath)
Expand All @@ -531,7 +531,7 @@ function CloudCmdProto(DOM) {
const first = DOM.getFiles(panel)[0];

DOM.setCurrentFile(current || first, {
history
history,
});
});
};
Expand Down
2 changes: 1 addition & 1 deletion client/dom/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function BufferProto() {
cut : callIfEnabled.bind(null, cut),
copy : callIfEnabled.bind(null, copy),
clear : callIfEnabled.bind(null, clear),
paste : callIfEnabled.bind(null, paste)
paste : callIfEnabled.bind(null, paste),
};

function showMessage(msg) {
Expand Down
4 changes: 2 additions & 2 deletions client/dom/current-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ module.exports.getParentDirPath = (panel) => {
*/
module.exports.getNotCurrentDirPath = () => {
const panel = DOM.getPanel({
active: false
active: false,
});

return DOM.getCurrentDirPath(panel);
Expand Down Expand Up @@ -267,7 +267,7 @@ module.exports.setTitle = (name) => {
if (!Title)
Title = DOM.getByTag('title')[0] || createElement('title', {
innerHTML: name,
parent: document.head
parent: document.head,
});

Title.textContent = name;
Expand Down
6 changes: 3 additions & 3 deletions client/dom/current-file.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ test('current-file: setCurrentName: return', (t) => {
const link = {};

global.DOM = getDOM({
link
link,
});

global.CloudCmd = getCloudCmd();
Expand Down Expand Up @@ -153,7 +153,7 @@ test('current-file: isCurrentFile', (t) => {
const isContainClass = stub();

global.DOM = getDOM({
isContainClass
isContainClass,
});

global.CloudCmd = getCloudCmd();
Expand Down Expand Up @@ -190,7 +190,7 @@ function getDOM({
CurrentInfo: {
link,
dirPath: '/',
}
},
};
}

2 changes: 1 addition & 1 deletion client/dom/events/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function EventsProto() {
return false;

return {
passive: true
passive: true,
};
};

Expand Down
2 changes: 1 addition & 1 deletion client/dom/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function getSystemFile(file, callback) {
load.ajax({
url,
success,
error
error,
});
});

Expand Down
2 changes: 1 addition & 1 deletion client/dom/images.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function getElement() {
id: 'js-status-image',
className: 'icon',
dataName: 'progress',
notAppend: true
notAppend: true,
});
}

Expand Down
24 changes: 12 additions & 12 deletions client/dom/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function CmdProto() {
const TITLE = 'Cloud Commander';
const TabPanel = {
'js-left' : null,
'js-right' : null
'js-right' : null,
};

this.loadRemote = (name, options, callback) => {
Expand All @@ -57,7 +57,7 @@ function CmdProto() {

this.loadSocket = function(callback) {
DOM.loadRemote('socket', {
name : 'io'
name : 'io',
}, callback);

return DOM;
Expand Down Expand Up @@ -117,7 +117,7 @@ function CmdProto() {
const currentName = name;

CloudCmd.refresh({
currentName
currentName,
});
});
});
Expand Down Expand Up @@ -686,7 +686,7 @@ function CmdProto() {
*/
this.hidePanel = (active) => {
const panel = DOM.getPanel({
active
active,
});

if (!panel)
Expand Down Expand Up @@ -769,7 +769,7 @@ function CmdProto() {

const files = {
from : dirPath + from,
to : dirPath + to
to : dirPath + to,
};

RESTful.mv(files, (error) => {
Expand Down Expand Up @@ -815,7 +815,7 @@ function CmdProto() {
CloudCmd.emit('passive-dir', Info.dirPath);

const panelPassive = DOM.getPanel({
active: false
active: false,
});

let name = DOM.getCurrentName();
Expand Down Expand Up @@ -848,7 +848,7 @@ function CmdProto() {
}

DOM.setCurrentFile(current, {
history: true
history: true,
});

CloudCmd.emit('active-dir', Info.dirPath);
Expand All @@ -869,7 +869,7 @@ function CmdProto() {
const {Dialog} = DOM;
const cancel = false;
const setPath = (path) => ({
path
path,
});

Dialog.prompt(TITLE, msg, path, {cancel})
Expand Down Expand Up @@ -905,7 +905,7 @@ function CmdProto() {
panel,
files,
element,
panelPassive
panelPassive,
} = Info;

const dirPath = DOM.getCurrentDirPath();
Expand All @@ -916,12 +916,12 @@ function CmdProto() {
CloudCmd.loadDir({
path: dirPath,
panel: panelPassive,
noCurrent: true
noCurrent: true,
});

CloudCmd.loadDir({
path: dirPathPassive,
panel
panel,
}, () => {
const {files} = Info;
const length = files.length - 1;
Expand All @@ -944,7 +944,7 @@ function CmdProto() {
const panel = files.parentElement;

const panelPassive = DOM.getPanel({
active: false
active: false,
});

const filesPassive = DOM.getFiles(panelPassive);
Expand Down
2 changes: 1 addition & 1 deletion client/dom/load-remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = (name, options, callback = options) => {

const remoteURL = remoteTmpls.map((tmpl) => {
return rendy(tmpl, {
version
version,
});
});

Expand Down
Loading

0 comments on commit ea08b92

Please sign in to comment.