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
154b4bd627
commit
610ba8827f
5 changed files with 42 additions and 24 deletions
|
|
@ -12,7 +12,11 @@ function _getModule(a) {
|
|||
return require(a);
|
||||
}
|
||||
|
||||
module.exports = (config, arg, {getModule = _getModule} = {}) => {
|
||||
module.exports = (config, arg, overrides = {}) => {
|
||||
const {
|
||||
getModule = _getModule,
|
||||
} = overrides;
|
||||
|
||||
if (!config('terminal'))
|
||||
return noop;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,12 @@ import {getThemes as _getThemes} from './theme.mjs';
|
|||
|
||||
const isString = (a) => typeof a === 'string';
|
||||
|
||||
export const root = (dir, config, {exit = _exit, statSync = _statSync} = {}) => {
|
||||
export const root = (dir, config, overrides = {}) => {
|
||||
const {
|
||||
exit = _exit,
|
||||
statSync = _statSync,
|
||||
} = overrides;
|
||||
|
||||
if (!isString(dir))
|
||||
throw Error('dir should be a string');
|
||||
|
||||
|
|
@ -36,7 +41,11 @@ export const packer = (name, {exit = _exit} = {}) => {
|
|||
exit('cloudcmd --packer: could be "tar" or "zip" only');
|
||||
};
|
||||
|
||||
export const columns = (type, {exit = _exit, getColumns = _getColumns} = {}) => {
|
||||
export const columns = (type, overrides = {}) => {
|
||||
const {
|
||||
exit = _exit,
|
||||
getColumns = _getColumns,
|
||||
} = overrides;
|
||||
const addQuotes = (a) => `"${a}"`;
|
||||
const all = Object
|
||||
.keys(getColumns())
|
||||
|
|
@ -51,7 +60,11 @@ export const columns = (type, {exit = _exit, getColumns = _getColumns} = {}) =>
|
|||
exit(`cloudcmd --columns: can be only one of: ${names}`);
|
||||
};
|
||||
|
||||
export const theme = (type, {exit = _exit, getThemes = _getThemes} = {}) => {
|
||||
export const theme = (type, overrides = {}) => {
|
||||
const {
|
||||
exit = _exit,
|
||||
getThemes = _getThemes,
|
||||
} = overrides;
|
||||
const addQuotes = (a) => `"${a}"`;
|
||||
const all = Object
|
||||
.keys(getThemes())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue