mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore: lint
This commit is contained in:
parent
fcce26d4e1
commit
1bef0d4381
13 changed files with 54 additions and 61 deletions
|
|
@ -165,7 +165,7 @@ module.exports.buildFromJSON = (params) => {
|
|||
Path(path);
|
||||
|
||||
fileTable += `${header}<ul data-name="js-files" class="files">`;
|
||||
|
||||
|
||||
/* Если мы не в корне */
|
||||
if (path !== '/') {
|
||||
const dotDot = getDotDot(path);
|
||||
|
|
@ -199,7 +199,7 @@ module.exports.buildFromJSON = (params) => {
|
|||
.map((file) => {
|
||||
const name = encode(file.name);
|
||||
const link = prefix + FS + path + name;
|
||||
|
||||
|
||||
const {
|
||||
type,
|
||||
mode,
|
||||
|
|
@ -207,17 +207,17 @@ module.exports.buildFromJSON = (params) => {
|
|||
owner,
|
||||
size,
|
||||
} = file;
|
||||
|
||||
|
||||
const linkResult = rendy(templateLink, {
|
||||
link,
|
||||
title: name,
|
||||
name,
|
||||
attribute: getAttribute(file.type),
|
||||
});
|
||||
|
||||
|
||||
const dataName = getDataName(file.name);
|
||||
const attribute = `draggable="true" ${dataName}`;
|
||||
|
||||
|
||||
return rendy(templateFile, {
|
||||
tag: 'li',
|
||||
attribute,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const entity = require('./entity');
|
|||
test('cloudcmd: entity: encode', (t) => {
|
||||
const result = entity.encode('<hello> ');
|
||||
const expected = '<hello> ';
|
||||
|
||||
|
||||
t.equal(result, expected, 'should encode entity');
|
||||
t.end();
|
||||
});
|
||||
|
|
@ -14,7 +14,7 @@ test('cloudcmd: entity: encode', (t) => {
|
|||
test('cloudcmd: entity: decode', (t) => {
|
||||
const result = entity.decode('<hello> ');
|
||||
const expected = '<hello> ';
|
||||
|
||||
|
||||
t.equal(result, expected, 'should decode entity');
|
||||
t.end();
|
||||
});
|
||||
|
|
@ -22,7 +22,7 @@ test('cloudcmd: entity: decode', (t) => {
|
|||
test('cloudcmd: entity: encode quote', (t) => {
|
||||
const result = entity.encode('"hello"');
|
||||
const expected = '"hello"';
|
||||
|
||||
|
||||
t.equal(result, expected, 'should encode entity');
|
||||
t.end();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue