mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 02:35:49 +00:00
chore: cloudcmd: actions: lint ☘️
This commit is contained in:
parent
ba7133f2e6
commit
339560fab2
9 changed files with 18 additions and 10 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ function EventsProto() {
|
|||
const getEventOptions = (eventName) => {
|
||||
if (eventName !== 'touchstart')
|
||||
return false;
|
||||
|
||||
|
||||
return {
|
||||
passive: true,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ module.exports.convert = (config) => {
|
|||
function setState(state) {
|
||||
if (state)
|
||||
return ' checked';
|
||||
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ function _refresh(to, nameIndex, res) {
|
|||
function getDir(root, dir) {
|
||||
if (root === '/')
|
||||
return dir;
|
||||
|
||||
|
||||
return root + dir;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,6 @@
|
|||
module.exports = (operation, from, to) => {
|
||||
if (!to)
|
||||
return `${operation} ${from}`;
|
||||
|
||||
|
||||
return `${operation} ${from} -> ${to}`;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ function setOperations(operator) {
|
|||
function getPacker(type) {
|
||||
if (type === 'zip')
|
||||
return packZipFn;
|
||||
|
||||
|
||||
return packTarFn;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ const createRequest = (a) => new Request(a, {
|
|||
const getRequest = (a, request) => {
|
||||
if (a !== '/')
|
||||
return request;
|
||||
|
||||
|
||||
return createRequest('/');
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ test('cloudfunc: render', (t) => {
|
|||
if (ret) {
|
||||
i = number;
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue