chore: lint

This commit is contained in:
coderaiser 2024-03-21 08:46:12 +02:00
parent fcce26d4e1
commit 1bef0d4381
13 changed files with 54 additions and 61 deletions

View file

@ -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,

View file

@ -6,7 +6,7 @@ const entity = require('./entity');
test('cloudcmd: entity: encode', (t) => {
const result = entity.encode('<hello> ');
const expected = '&lt;hello&gt; ';
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('&lt;hello&gt; ');
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 = '&quot;hello&quot;';
t.equal(result, expected, 'should encode entity');
t.end();
});