Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const depusedSubtask = require('./subtasks/depused');
const taskNames = [
'robo',
'structure',
'audit',
'eslint',
'yamllint',
'depcheck',
'depused'
];
const schema = Joi.object().keys({
logger: Joi.any(),
cwd: Joi.string(),
skip: Joi.array().items(Joi.string().valid(...taskNames)).unique(),
docker: Joi.boolean()
});
module.exports = (options = {}) => {
assert(options instanceof Object && !Array.isArray(options));
const ctx = {
logger: log,
cwd: process.cwd(),
skip: [],
docker: false,
...options
};
assert(
schema.validate(ctx).error === undefined,
`Parameter Validation Error: ${schema.validate(ctx).error}`
);