mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
chore(cloudcmd) lint: key-spacing
This commit is contained in:
parent
a91344595c
commit
59338a16ac
8 changed files with 38 additions and 36 deletions
|
|
@ -8,6 +8,9 @@ module.exports = {
|
|||
'putout',
|
||||
'node',
|
||||
],
|
||||
rules: {
|
||||
'key-spacing': 'off',
|
||||
},
|
||||
overrides: [{
|
||||
files: ['bin/release.js'],
|
||||
rules: {
|
||||
|
|
|
|||
|
|
@ -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: '--- --- ---',
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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": ""
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue