chore: cloudcmd: actions: lint ☘️

This commit is contained in:
coderaiser 2023-08-07 15:09:19 +00:00
parent ba7133f2e6
commit 339560fab2
9 changed files with 18 additions and 10 deletions

View file

@ -285,7 +285,15 @@ test('current-file: parseHrefAttribute', (t) => {
t.end();
});
function getDOM({link = {}, getCurrentDirPath = stub(), getCurrentDirName = stub(), getByDataName = stub(), isContainClass = stub(), getCurrentType = stub(), getCurrentPath = stub()} = {}) {
function getDOM({
link = {},
getCurrentDirPath = stub(),
getCurrentDirName = stub(),
getByDataName = stub(),
isContainClass = stub(),
getCurrentType = stub(),
getCurrentPath = stub(),
} = {}) {
return {
getCurrentDirPath,
getCurrentDirName,

View file

@ -11,7 +11,7 @@ function EventsProto() {
const getEventOptions = (eventName) => {
if (eventName !== 'touchstart')
return false;
return {
passive: true,
};

View file

@ -37,13 +37,13 @@ module.exports._previous = previous;
function next(index, length) {
if (index === length - 1)
return 0;
return ++index;
}
function previous(index, length) {
if (!index)
return length - 1;
return --index;
}

View file

@ -39,7 +39,7 @@ module.exports.convert = (config) => {
function setState(state) {
if (state)
return ' checked';
return '';
}

View file

@ -129,7 +129,7 @@ function _refresh(to, nameIndex, res) {
function getDir(root, dir) {
if (root === '/')
return dir;
return root + dir;
}

View file

@ -3,6 +3,6 @@
module.exports = (operation, from, to) => {
if (!to)
return `${operation} ${from}`;
return `${operation} ${from} -> ${to}`;
};

View file

@ -194,7 +194,7 @@ function setOperations(operator) {
function getPacker(type) {
if (type === 'zip')
return packZipFn;
return packTarFn;
}

View file

@ -45,7 +45,7 @@ const createRequest = (a) => new Request(a, {
const getRequest = (a, request) => {
if (a !== '/')
return request;
return createRequest('/');
};

View file

@ -85,7 +85,7 @@ test('cloudfunc: render', (t) => {
if (ret) {
i = number;
}
return ret;
});