chore: lint

This commit is contained in:
coderaiser 2023-08-07 17:40:25 +03:00
parent 13279299c4
commit 24dcf78be8
16 changed files with 25 additions and 26 deletions

View file

@ -109,7 +109,7 @@ module.exports._getPrefix = getPrefix;
function getPrefix(prefix) {
if (isFn(prefix))
return prefix() || '';
return prefix || '';
}
@ -258,7 +258,7 @@ module.exports._replaceDist = replaceDist;
function replaceDist(url) {
if (!isDev)
return url;
return url.replace(/^\/dist\//, '/dist-dev/');
}

View file

@ -76,7 +76,7 @@ const manageListen = currify((manage, socket, auth) => {
function initWrite(filename, configManager) {
if (filename)
return write.bind(null, filename, configManager);
return resolve;
}

View file

@ -1,6 +1,5 @@
'use strict';
const isString = (a) => typeof a === 'string';
const {join} = require('path');
const {callbackify} = require('util');
@ -10,7 +9,7 @@ const threadIt = require('thread-it');
const {read} = require('redzip');
const root = require('../root');
const isString = (a) => typeof a === 'string';
const parse = threadIt(join(__dirname, 'worker'));
threadIt.init();

View file

@ -1,7 +1,5 @@
'use strict';
const isFn = (a) => typeof a === 'function';
const isString = (a) => typeof a === 'string';
const DIR = '../';
const DIR_COMMON = `${DIR}../common/`;
@ -24,7 +22,8 @@ const ponse = require('ponse');
const copymitter = require('copymitter');
const moveFiles = require('@cloudcmd/move-files');
const isString = (a) => typeof a === 'string';
const isFn = (a) => typeof a === 'function';
const swap = wraptile((fn, a, b) => fn(b, a));
const isWin32 = process.platform === 'win32';
const {apiURL} = CloudFunc;

View file

@ -1,10 +1,10 @@
'use strict';
const isString = (a) => typeof a === 'string';
const tryCatch = require('try-catch');
const exit = require('./exit');
const columns = require('./columns');
const isString = (a) => typeof a === 'string';
module.exports.root = (dir, config) => {
if (!isString(dir))