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', 'putout',
'node', 'node',
], ],
rules: {
'key-spacing': 'off',
},
overrides: [{ overrides: [{
files: ['bin/release.js'], files: ['bin/release.js'],
rules: { rules: {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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