chore(cloudcmd) lint: key-spacing

This commit is contained in:
coderaiser 2021-01-05 13:35:58 +02:00
parent a91344595c
commit 59338a16ac
8 changed files with 38 additions and 36 deletions

View file

@ -8,6 +8,9 @@ module.exports = {
'putout',
'node',
],
rules: {
'key-spacing': 'off',
},
overrides: [{
files: ['bin/release.js'],
rules: {

View file

@ -135,9 +135,9 @@ module.exports.buildFromJSON = (params) => {
const htmlPath = getPathLink(path, prefix, template.pathLink);
let fileTable = rendy(template.path, {
link : prefix + FS + path,
fullPath : path,
path : htmlPath,
link: prefix + FS + path,
fullPath: path,
path: htmlPath,
});
const owner = 'owner';
@ -150,10 +150,10 @@ module.exports.buildFromJSON = (params) => {
const date = getFieldName('date');
const header = rendy(templateFile, {
tag : 'div',
attribute : 'data-name="js-fm-header" ',
className : 'fm-header',
type : '',
tag: 'div',
attribute: 'data-name="js-fm-header" ',
className: 'fm-header',
type: '',
name,
size,
date,
@ -173,8 +173,8 @@ module.exports.buildFromJSON = (params) => {
const linkResult = rendy(template.link, {
link,
title : '..',
name : '..',
title: '..',
name: '..',
});
const dataName = 'data-name="js-file-.." ';
@ -182,15 +182,15 @@ module.exports.buildFromJSON = (params) => {
/* Сохраняем путь к каталогу верхнего уровня*/
fileTable += rendy(template.file, {
tag : 'li',
tag: 'li',
attribute,
className : '',
type : 'directory',
name : linkResult,
size : '<dir>',
date : '--.--.----',
owner : '.',
mode : '--- --- ---',
className: '',
type: 'directory',
name: linkResult,
size: '<dir>',
date: '--.--.----',
owner: '.',
mode: '--- --- ---',
});
}

View file

@ -7,7 +7,7 @@
"editor": "edward",
"packer": "tar",
"diff": true,
"zip" : true,
"zip": true,
"buffer": true,
"dirStorage": false,
"online": false,
@ -44,4 +44,3 @@
"dropbox": false,
"dropboxToken": ""
}

View file

@ -186,10 +186,10 @@ function get(manage, request, response) {
const data = jonny.stringify(manage('*'));
ponse.send(data, {
name : 'config.json',
name: 'config.json',
request,
response,
cache : false,
cache: false,
});
}

View file

@ -5,7 +5,7 @@ const exit = require('./exit');
const stub = require('@cloudcmd/stub');
test('cloudcmd: exit: process.exit', (t) => {
const {exit:exitOriginal} = process;
const {exit: exitOriginal} = process;
process.exit = stub();
exit();
@ -16,7 +16,7 @@ test('cloudcmd: exit: process.exit', (t) => {
});
test('cloudcmd: exit: console.error', (t) => {
const {exit:exitOriginal} = process;
const {exit: exitOriginal} = process;
const {error} = console;
console.error = stub();
@ -32,7 +32,7 @@ test('cloudcmd: exit: console.error', (t) => {
});
test('cloudcmd: exit.error: console.error: error', (t) => {
const {exit:exitOriginal} = process;
const {exit: exitOriginal} = process;
const {error} = console;
console.error = stub();

View file

@ -137,18 +137,18 @@ function indexProcessing(config, options) {
.replace('icon-terminal', 'icon-terminal none');
const left = rendy(Template.panel, {
side : 'left',
content : panel,
className : !oneFilePanel ? '' : 'panel-single',
side: 'left',
content: panel,
className: !oneFilePanel ? '' : 'panel-single',
});
let right = '';
if (!oneFilePanel)
right = rendy(Template.panel, {
side : 'right',
content : panel,
className : '',
side: 'right',
content: panel,
className: '',
});
const name = config('name');

View file

@ -43,7 +43,7 @@ test('cloudcmd: terminal: enabled', (t) => {
});
test('cloudcmd: terminal: enabled: no string', (t) => {
const {log:originalLog} = console;
const {log: originalLog} = console;
const log = stub();
console.log = log;

View file

@ -34,19 +34,19 @@ const TMPL = [
].map(addHBS);
const data = {
path : '/etc/X11/',
files : [{
path: '/etc/X11/',
files: [{
name: 'applnk',
size: '4.0.0kb',
date: '21.02.2016',
uid : 0,
uid: 0,
mode: 'rwx r-x r-x',
type: 'directory',
}, {
name: 'ай',
size: '1.30kb',
date: 0,
uid : 0,
uid: 0,
mode: 'rwx r-x r-x',
type: 'file',
}],
@ -73,7 +73,7 @@ test('cloudfunc: render', (t) => {
time('CloudFunc.buildFromJSON');
const result = CloudFunc.buildFromJSON({
prefix : '',
prefix: '',
data,
template,
});